insideout10/wordlift-plugin-js

View on GitHub

Showing 1,798 of 3,223 total issues

Function prettyDate has 111 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        prettyDate: function(d, is_abbr, p, d2) {
            var _date,
                _date2,
                format,
                bc_check,
Severity: Major
Found in app/lib/TimelineJS.build/build/js/timeline.js - About 4 hrs to fix

    File image.js has 350 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    var ImageDialog = {
        preInit : function() {
            var url;
    
            tinyMCEPopup.requireLangPack();
    Severity: Minor
    Found in app/lib/tinymce/jscripts/tiny_mce/plugins/advimage/js/image.js - About 4 hrs to fix

      Function load has 110 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      QUnit.load = function() {
          runLoggingCallbacks( "begin", QUnit, {} );
      
          // Initialize the config, saving the execution queue
          var banner, filter, i, label, len, main, ol, toolbar, userAgent, val,
      Severity: Major
      Found in app/lib/jquery-ui-1.10.3/external/qunit.js - About 4 hrs to fix

        File wp-lists.js has 349 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /* global ajaxurl, wpAjax */
        (function($) {
        var fs = {add:'ajaxAdd',del:'ajaxDel',dim:'ajaxDim',process:'process',recolor:'recolor'}, wpList;
        
        wpList = {
        Severity: Minor
        Found in app/admin_files/wp-lists.js - About 4 hrs to fix

          Function buildMarkers has 109 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  function buildMarkers() {
                      
                      var row            = 2,
                          lpos        = 0,
                          row_depth    = 0,
          Severity: Major
          Found in app/lib/TimelineJS.build/build/js/timeline.js - About 4 hrs to fix

            Function _startDrag has 109 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    _startDrag : function(id, se, ac) {
                        var t = this, mu, mm, d = DOM.doc, eb, w = t.windows[id], we = w.element, sp = we.getXY(), p, sz, ph, cp, vp, sx, sy, sex, sey, dx, dy, dw, dh;
            
                        // Get positons and sizes
            //            cp = DOM.getPos(t.editor.getContainer());

              Function Sizzle has 108 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              var Sizzle = function( selector, context, results, seed ) {
                  results = results || [];
                  context = context || document;
              
                  var origContext = context;
              Severity: Major
              Found in app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js - About 4 hrs to fix

                Function moveToBookmark has 108 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        moveToBookmark : function(bookmark) {
                            var t = this, dom = t.dom, marker1, marker2, rng, rng2, root, startContainer, endContainer, startOffset, endOffset;
                
                            function setEndPoint(start) {
                                var point = bookmark[start ? 'start' : 'end'], i, node, offset, children;
                Severity: Major
                Found in app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js - About 4 hrs to fix

                  Function positionInterval has 107 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          function positionInterval(the_main_element, the_intervals, is_animated, is_minor) {
                              
                              var last_position        = 0,
                                  last_position_major    = 0,
                                  //in_view_margin        = (config.nav.minor_width/config.nav.multiplier.current)/2,
                  Severity: Major
                  Found in app/lib/TimelineJS.build/build/js/timeline.js - About 4 hrs to fix

                    Function _create has 107 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        _create: function() {
                    
                            var n, i, handle, axis, hname,
                                that = this,
                                o = this.options;
                    Severity: Major
                    Found in app/lib/jquery-ui-1.10.3/ui/jquery-ui.js - About 4 hrs to fix

                      Function _create has 107 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          _create: function() {
                      
                              var n, i, handle, axis, hname,
                                  that = this,
                                  o = this.options;
                      Severity: Major
                      Found in app/lib/jquery-ui-1.10.3/ui/jquery.ui.resizable.js - About 4 hrs to fix

                        Function brushstart has 106 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function brushstart() {
                              var target = this, eventTarget = d3.select(d3.event.target), event_ = event.of(target, arguments), g = d3.select(target), resizing = eventTarget.datum(), resizingX = !/^(n|s)$/.test(resizing) && x, resizingY = !/^(e|w)$/.test(resizing) && y, dragging = eventTarget.classed("extent"), dragRestore = d3_event_dragSuppress(), center, origin = d3.mouse(target), offset;
                              var w = d3.select(d3_window).on("keydown.brush", keydown).on("keyup.brush", keyup);
                              if (d3.event.changedTouches) {
                                w.on("touchmove.brush", brushmove).on("touchend.brush", brushend);
                        Severity: Major
                        Found in app/lib/d3/d3.js - About 4 hrs to fix

                          Function normalize has 106 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  normalize : function() {
                                      var self = this, rng, normalized, collapsed, node, sibling;
                          
                                      function normalizeEndPoint(start) {
                                          var container, offset, walker, dom = self.dom, body = dom.getRoot(), node, nonEmptyElementsMap, nodeName;
                          Severity: Major
                          Found in app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js - About 4 hrs to fix

                            Function parse has 103 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    parse : function(css) {
                                        var styles = {}, matches, name, value, isEncoded, urlConverter = settings.url_converter, urlConverterScope = settings.url_converter_scope || this;
                            
                                        function compress(prefix, suffix) {
                                            var top, right, bottom, left;
                            Severity: Major
                            Found in app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js - About 4 hrs to fix

                              Function init has 103 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      init : function(s) {
                                          var t = this, pl, sl = tinymce.ScriptLoader, e, el = [], ed;
                              
                                          function createId(elm) {
                                              var id = elm.id;
                              Severity: Major
                              Found in app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js - About 4 hrs to fix

                                File Gruntfile.js has 338 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                module.exports = function( grunt ) {
                                
                                "use strict";
                                
                                var
                                Severity: Minor
                                Found in app/lib/jquery-ui-1.10.3/Gruntfile.js - About 4 hrs to fix

                                  Function removeEventListener has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      removeEventListener: function (types, fn, context) { // ([String, Function, Object]) or (Object[, Object])
                                  
                                          if (!this[eventsKey]) {
                                              return this;
                                          }
                                  Severity: Minor
                                  Found in bower_components/leaflet/src/core/Events.js - About 4 hrs to fix

                                  Cognitive Complexity

                                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                  A method's cognitive complexity is based on a few simple rules:

                                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                  • Code is considered more complex for each "break in the linear flow of the code"
                                  • Code is considered more complex when "flow breaking structures are nested"

                                  Further reading

                                  Function go has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      go: function( id, mode ) {
                                          var t = this, ed, wrap_id, txtarea_el,
                                              dom = tinymce.DOM;
                                  
                                          id = id || 'content';
                                  Severity: Minor
                                  Found in app/admin_files/editor.js - About 4 hrs to fix

                                  Cognitive Complexity

                                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                  A method's cognitive complexity is based on a few simple rules:

                                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                  • Code is considered more complex for each "break in the linear flow of the code"
                                  • Code is considered more complex when "flow breaking structures are nested"

                                  Further reading

                                  Function parse has 102 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                        service.parse = function(data, merge) {
                                          var anotherEntityAnnotation, anotherId, context, createLanguage, dctype, entities, entity, entityAnnotation, entityAnnotations, graph, id, item, language, languages, textAnnotation, textAnnotationId, textAnnotations, types, _i, _j, _len, _len1, _ref, _ref1, _ref2, _ref3;
                                          if (merge == null) {
                                            merge = false;
                                          }
                                  Severity: Major
                                  Found in app/js/wordlift.js - About 4 hrs to fix

                                    Function quadtree has 102 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      d3.geom.quadtree = function(points, x1, y1, x2, y2) {
                                        var x = d3_geom_pointX, y = d3_geom_pointY, compat;
                                        if (compat = arguments.length) {
                                          x = d3_geom_quadtreeCompatX;
                                          y = d3_geom_quadtreeCompatY;
                                    Severity: Major
                                    Found in app/lib/d3/d3.js - About 4 hrs to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language