insideout10/wordlift-plugin-js

View on GitHub

Showing 1,798 of 3,223 total issues

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

        parse: function(d, precision) {
            "use strict";
            var date,
                date_array,
                time_array,
Severity: Major
Found in app/lib/TimelineJS.build/build/js/timeline.js - About 1 day to fix

    Function expandRng has 225 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            function expandRng(rng, format, remove) {
                var sibling, lastIdx, leaf, endPoint,
                    startContainer = rng.startContainer,
                    startOffset = rng.startOffset,
                    endContainer = rng.endContainer,
    Severity: Major
    Found in app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js - About 1 day to fix

      File common.js has 539 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /* global setUserSetting, ajaxurl, commonL10n, alert, confirm, toggleWithKeyboard, pagenow */
      var showNotice, adminMenu, columns, validateForm, screenMeta;
      ( function( $, window, undefined ) {
      // Removed in 3.3.
      // (perhaps) needed for back-compat
      Severity: Major
      Found in app/admin_files/common.js - About 1 day to fix

        Function buildDataCells has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring.
        Open

                        buildDataCells: function(d) {
                            var data_obj    = VMM.Timeline.DataObj.data_template_obj,
                                is_valid    = false,
                                cellnames    = ["timeline"],
                                list         = [],
        Severity: Minor
        Found in app/lib/TimelineJS.build/build/js/timeline.js - About 1 day 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 open has 218 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                open : function(f, p) {
                    var t = this, id, opt = '', ed = t.editor, dw = 0, dh = 0, vp, po, mdf, clf, we, w, u, parentWindow;
        
                    f = f || {};
                    p = p || {};

          File media-models.js has 526 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /* global _wpMediaModelsL10n:false */
          window.wp = window.wp || {};
          
          (function($){
              var Attachment, Attachments, Query, compare, l10n, media;
          Severity: Major
          Found in app/admin_files/media-models.js - About 1 day to fix

            Function moveStates has 215 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    moveStates : function(to_form, field) {
                        var data = this.data, editor = this.editor,
                            mediaPlugin = editor.plugins.media, ext, src, typeInfo, defaultStates, src;
            
                        defaultStates = {
            Severity: Major
            Found in app/lib/tinymce/jscripts/tiny_mce/plugins/media/js/media.js - About 1 day to fix

              Function itself has 215 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  var itself = function (s, o, g) {
                      var a, i, k, x;
                      var optionKeys;
                      var newOptionObj = {};
              
              
              Severity: Major
              Found in app/lib/jquery-ui-1.10.3/external/jshint.js - About 1 day to fix

                Function ForceBlocks has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring.
                Open

                tinymce.ForceBlocks = function(editor) {
                    var settings = editor.settings, dom = editor.dom, selection = editor.selection, blockElements = editor.schema.getBlockElements();
                
                    function addRootBlocks() {
                        var node = selection.getStart(), rootNode = editor.getBody(), rng, startContainer, startOffset, endContainer, endOffset, rootBlockNode, tempNode, offset = -0xFFFFFF, wrapped, isInEditorDocument;
                Severity: Minor
                Found in app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js - About 1 day 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 d3_locale_timeFormat has 213 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  function d3_locale_timeFormat(locale) {
                    var locale_dateTime = locale.dateTime, locale_date = locale.date, locale_time = locale.time, locale_periods = locale.periods, locale_days = locale.days, locale_shortDays = locale.shortDays, locale_months = locale.months, locale_shortMonths = locale.shortMonths;
                    function d3_time_format(template) {
                      var n = template.length;
                      function format(date) {
                Severity: Major
                Found in app/lib/d3/d3.js - About 1 day to fix

                  Function chord has 210 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      chord: function(options) {
                        var buildChord, container, init, log, retrieveChordData, settings;
                        settings = {
                          dataEndpoint: void 0,
                          mainColor: '#777',
                  Severity: Major
                  Found in app/js/wordlift.ui.js - About 1 day to fix

                    Function force has 207 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      d3.layout.force = function() {
                        var force = {}, event = d3.dispatch("start", "tick", "end"), size = [ 1, 1 ], drag, alpha, friction = .9, linkDistance = d3_layout_forceLinkDistance, linkStrength = d3_layout_forceLinkStrength, charge = -30, chargeDistance2 = d3_layout_forceChargeDistance2, gravity = .1, theta2 = .64, nodes = [], links = [], distances, strengths, charges;
                        function repulse(node) {
                          return function(quad, x1, _, x2) {
                            if (quad.point !== node) {
                    Severity: Major
                    Found in app/lib/d3/d3.js - About 1 day to fix

                      File editor_plugin_src.js has 511 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      /**
                       * editor_plugin_src.js
                       *
                       * Copyright 2009, Moxiecode Systems AB
                       * Released under LGPL License.

                        File media-editor.js has 509 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        /* global getUserSetting, tinymce, QTags, wpActiveEditor */
                        
                        // WordPress, TinyMCE, and Media
                        // -----------------------------
                        (function($){
                        Severity: Major
                        Found in app/admin_files/media-editor.js - About 1 day to fix

                          Function Slide has 204 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              VMM.Slider.Slide = function(d, _parent) {
                                  
                                  var $media, $text, $slide, $wrap, element, c,
                                      data        = d,
                                      slide        = {},
                          Severity: Major
                          Found in app/lib/TimelineJS.build/build/js/timeline.js - About 1 day to fix

                            Function DragSlider has 202 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                VMM.DragSlider = function() {
                                    var drag = {
                                        element:        "",
                                        element_move:    "",
                                        constraint:        "",
                            Severity: Major
                            Found in app/lib/TimelineJS.build/build/js/timeline.js - About 1 day to fix

                              Function applyList has 200 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      applyList: function(targetListType, oppositeListType) {
                                          var t = this, ed = t.ed, dom = ed.dom, applied = [], hasSameType = false, hasOppositeType = false, hasNonList = false, actions,
                                                  selectedBlocks = ed.selection.getSelectedBlocks();
                              
                                          function cleanupBr(e) {
                              Severity: Major
                              Found in app/lib/tinymce/jscripts/tiny_mce/plugins/lists/editor_plugin_src.js - About 1 day to fix

                                File wp-langs-en.js has 499 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                tinyMCE.addI18n({en:{
                                common:{
                                edit_confirm:"Do you want to use the WYSIWYG mode for this textarea?",
                                apply:"Apply",
                                insert:"Insert",
                                Severity: Minor
                                Found in app/admin_files/wp-langs-en.js - About 1 day to fix

                                  Function SaxParser has 199 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      tinymce.html.SaxParser = function(settings, schema) {
                                          var self = this, noop = function() {};
                                  
                                          settings = settings || {};
                                          self.schema = schema = schema || new tinymce.html.Schema();
                                  Severity: Major
                                  Found in app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js - About 7 hrs to fix

                                    Function updateAction has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                    function updateAction() {
                                        var el, inst = ed, tdElm, trElm, tableElm, formObj = document.forms[0];
                                    
                                        if (!AutoValidator.validate(formObj)) {
                                            tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.');
                                    Severity: Minor
                                    Found in app/lib/tinymce/jscripts/tiny_mce/plugins/table/js/cell.js - About 7 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

                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language