insideout10/wordlift-plugin-js

View on GitHub

Showing 1,798 of 3,223 total issues

File jquery.ui.accordion.js has 453 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * jQuery UI Accordion 1.10.3
 * http://jqueryui.com
 *
 * Copyright 2013 jQuery Foundation and other contributors
Severity: Minor
Found in app/lib/jquery-ui-1.10.3/ui/jquery.ui.accordion.js - About 6 hrs to fix

    Function createIntervalElements has 171 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            function createIntervalElements(_interval, _array, _element_parent) {
                
                var inc_time            = 0,
                    _first_run            = true,
                    _last_pos            = 0,
    Severity: Major
    Found in app/lib/TimelineJS.build/build/js/timeline.js - About 6 hrs to fix

      Function _preProcess has 169 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              _preProcess : function(pl, o) {
                  var ed = this.editor,
                      h = o.content,
                      grep = tinymce.grep,
                      explode = tinymce.explode,
      Severity: Major
      Found in app/lib/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin_src.js - About 6 hrs to fix

        Function _generateHTML has 169 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            _generateHTML: function(inst) {
                var maxDraw, prevText, prev, nextText, next, currentText, gotoDate,
                    controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin,
                    monthNames, monthNamesShort, beforeShowDay, showOtherMonths,
                    selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate,
        Severity: Major
        Found in app/lib/jquery-ui-1.10.3/ui/jquery.ui.datepicker.js - About 6 hrs to fix

          Function _generateHTML has 169 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              _generateHTML: function(inst) {
                  var maxDraw, prevText, prev, nextText, next, currentText, gotoDate,
                      controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin,
                      monthNames, monthNamesShort, beforeShowDay, showOtherMonths,
                      selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate,
          Severity: Major
          Found in app/lib/jquery-ui-1.10.3/ui/jquery-ui.js - About 6 hrs to fix

            Function fakeImageResize has 166 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function fakeImageResize() {
                    var selectedElmX, selectedElmY, selectedElm, selectedElmGhost, selectedHandle, startX, startY, startW, startH, ratio,
                        resizeHandles, width, height, rootDocument = document, editableDoc = editor.getDoc();
            
                    if (!settings.object_resizing || settings.webkit_fake_resize === false) {
            Severity: Major
            Found in app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js - About 6 hrs to fix

              Function svgPainter has 166 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              wp.svgPainter = ( function( $, window, document, undefined ) {
                  'use strict';
                  var selector, base64, painter,
                      colorscheme = {},
                      elements = [];
              Severity: Major
              Found in app/admin_files/svg-painter.js - About 6 hrs to fix

                File wplink.js has 439 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /* global ajaxurl, tinymce, wpLinkL10n, tinyMCEPopup, setUserSetting, wpActiveEditor */
                var wpLink;
                
                (function($){
                    var inputs = {}, rivers = {}, ed, River, Query;
                Severity: Minor
                Found in app/admin_files/wplink.js - About 6 hrs to fix

                  Function performAnimation has 158 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                        function performAnimation(animationEvent, className, element, parentElement, afterElement, domOperation, doneCallback) {
                  
                          var runner = animationRunner(element, animationEvent, className);
                          if(!runner) {
                            fireDOMOperation();
                  Severity: Major
                  Found in app/lib/angular/angular-animate.js - About 6 hrs to fix

                    Function size has 156 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    $.effects.effect.size = function( o, done ) {
                    
                        // Create element
                        var original, baseline, factor,
                            el = $( this ),
                    Severity: Major
                    Found in app/lib/jquery-ui-1.10.3/ui/jquery-ui.js - About 6 hrs to fix

                      Function size has 156 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      $.effects.effect.size = function( o, done ) {
                      
                          // Create element
                          var original, baseline, factor,
                              el = $( this ),
                      Severity: Major
                      Found in app/lib/jquery-ui-1.10.3/ui/jquery.ui.effect-scale.js - About 6 hrs to fix

                        Function Styles has 155 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        tinymce.html.Styles = function(settings, schema) {
                            var rgbRegExp = /rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,
                                urlOrStrRegExp = /(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,
                                styleRegExp = /\s*([^:]+):\s*([^;]+);?/g,
                                trimRightRegExp = /\s+$/,
                        Severity: Major
                        Found in app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js - About 6 hrs to fix

                          Function applyRngStyle has 153 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                      function applyRngStyle(rng, bookmark, node_specific) {
                                          var newWrappers = [], wrapName, wrapElm, contentEditable = true;
                          
                                          // Setup wrapper element
                                          wrapName = format.inline || format.block;
                          Severity: Major
                          Found in app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js - About 6 hrs to fix

                            Function svgPainter has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring.
                            Open

                            wp.svgPainter = ( function( $, window, document, undefined ) {
                                'use strict';
                                var selector, base64, painter,
                                    colorscheme = {},
                                    elements = [];
                            Severity: Minor
                            Found in app/admin_files/svg-painter.js - About 6 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 buildData has 152 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                            buildData: function(d) {
                                                VMM.fireEvent(global, VMM.Timeline.Config.events.messege, "Parsing Data");
                                                var _data_obj = VMM.Timeline.DataObj.data_template_obj;
                                                
                                                _data_obj.timeline.startDate    =     new Date(d.content.date.created);;
                            Severity: Major
                            Found in app/lib/TimelineJS.build/build/js/timeline.js - About 6 hrs to fix

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

                                      init : function() {
                                          var n, t = this, s = t.settings, w, h, mh, e = t.getElement(), o, ti, u, bi, bc, re, i, initializedPlugins = [];
                              
                                          tinymce.add(t);
                              
                              Severity: Major
                              Found in app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js - About 6 hrs to fix

                                File jquery.ui.position.js has 419 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                /*!
                                 * jQuery UI Position 1.10.3
                                 * http://jqueryui.com
                                 *
                                 * Copyright 2013 jQuery Foundation and other contributors
                                Severity: Minor
                                Found in app/lib/jquery-ui-1.10.3/ui/jquery.ui.position.js - About 6 hrs to fix

                                  File TileLayer.js has 415 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  /*
                                   * L.TileLayer is used for standard xyz-numbered tile layers.
                                   */
                                  
                                  L.TileLayer = L.Class.extend({
                                  Severity: Minor
                                  Found in bower_components/leaflet/src/layer/tile/TileLayer.js - About 5 hrs to fix

                                    Function parseDate has 148 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        parseDate: function (format, value, settings) {
                                            if (format == null || value == null) {
                                                throw "Invalid arguments";
                                            }
                                    
                                    
                                    Severity: Major
                                    Found in app/lib/jquery-ui-1.10.3/ui/jquery-ui.js - About 5 hrs to fix

                                      Function parseDate has 148 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          parseDate: function (format, value, settings) {
                                              if (format == null || value == null) {
                                                  throw "Invalid arguments";
                                              }
                                      
                                      
                                      Severity: Major
                                      Found in app/lib/jquery-ui-1.10.3/ui/jquery.ui.datepicker.js - About 5 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language