insideout10/wordlift-plugin-js

View on GitHub

Showing 1,798 of 3,223 total issues

Function prettyDate has a Cognitive Complexity of 105 (exceeds 5 allowed). Consider refactoring.
Open

        prettyDate: function(d, is_abbr, p, d2) {
            var _date,
                _date2,
                format,
                bc_check,
Severity: Minor
Found in app/lib/TimelineJS.build/build/js/timeline.js - About 2 days 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 EnterKey has 398 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    tinymce.EnterKey = function(editor) {
        var dom = editor.dom, selection = editor.selection, settings = editor.settings, undoManager = editor.undoManager, nonEmptyElementsMap = editor.schema.getNonEmptyElements();

        function handleEnterKey(evt) {
            var rng = selection.getRng(true), tmpRng, editableRoot, container, offset, parentBlock, documentMode, shiftKey,
Severity: Major
Found in app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js - About 1 day to fix

    Function handleEnterKey has 388 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            function handleEnterKey(evt) {
                var rng = selection.getRng(true), tmpRng, editableRoot, container, offset, parentBlock, documentMode, shiftKey,
                    newBlock, fragment, containerBlock, parentBlockName, containerBlockName, newBlockName, isAfterLastNodeInContainer;
    
                // Returns true if the block can be split into two blocks or not
    Severity: Major
    Found in app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js - About 1 day to fix

      Function EditorCommands has 377 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          tinymce.EditorCommands = function(editor) {
              var dom = editor.dom,
                  selection = editor.selection,
                  commands = {state: {}, exec : {}, value : {}},
                  settings = editor.settings,
      Severity: Major
      Found in app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js - About 1 day to fix

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

        /**
         * editor_plugin_src.js
         *
         * Copyright 2011, Moxiecode Systems AB
         * Released under LGPL License.
        Severity: Major
        Found in app/lib/tinymce/jscripts/tiny_mce/plugins/lists/editor_plugin_src.js - About 1 day to fix

          Function Heartbeat has 366 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              var Heartbeat = function() {
                  var $document = $(document),
                      settings = {
                          // Suspend/resume
                          suspend: false,
          Severity: Major
          Found in app/admin_files/heartbeat.js - About 1 day to fix

            Function generateCSS has a Cognitive Complexity of 89 (exceeds 5 allowed). Consider refactoring.
            Open

            function generateCSS() {
                var ce = document.getElementById('container'), f = document.forms[0], num = new RegExp('[0-9]+', 'g'), s, t;
            
                ce.style.cssText = "";
            
            Severity: Minor
            Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.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

            File post.js has 744 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /* global postL10n, ajaxurl, wpAjax, setPostThumbnailL10n, postboxes, pagenow, tinymce, alert, deleteUserSetting, getUserSetting, setUserSetting */
            /* global theList:true, theExtraList:true, autosave:true */
            
            var tagBox, commentsBox, editPermalink, makeSlugeditClickable, WPSetThumbnailHTML, WPSetThumbnailID, WPRemoveThumbnail, wptitlehint;
            
            
            Severity: Major
            Found in app/admin_files/post.js - About 1 day to fix

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

              /*!
               * jQuery UI Resizable 1.10.3
               * http://jqueryui.com
               *
               * Copyright 2013 jQuery Foundation and other contributors
              Severity: Major
              Found in app/lib/jquery-ui-1.10.3/ui/jquery.ui.resizable.js - About 1 day to fix

                Function exports has 335 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

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

                  Function Selection has 325 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function Selection(selection) {
                          var self = this, dom = selection.dom, TRUE = true, FALSE = false;
                  
                          function getPosition(rng, start) {
                              var checkRng, startIndex = 0, endIndex, inside,
                  Severity: Major
                  Found in app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js - About 1 day to fix

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

                    /*!
                     * jQuery UI Draggable 1.10.3
                     * http://jqueryui.com
                     *
                     * Copyright 2013 jQuery Foundation and other contributors
                    Severity: Major
                    Found in app/lib/jquery-ui-1.10.3/ui/jquery.ui.draggable.js - About 1 day to fix

                      Function DragSlider has a Cognitive Complexity of 80 (exceeds 5 allowed). Consider refactoring.
                      Open

                          VMM.DragSlider = function() {
                              var drag = {
                                  element:        "",
                                  element_move:    "",
                                  constraint:        "",
                      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 createAPIMap has 316 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                  createAPIMap: function(m) {
                                      var map_attribution    = "",
                                          layer,
                                          map,
                                          map_options,
                      Severity: Major
                      Found in app/lib/TimelineJS.build/build/js/timeline.js - About 1 day to fix

                        Function updateStyle has a Cognitive Complexity of 79 (exceeds 5 allowed). Consider refactoring.
                        Open

                            updateStyle : function(ty) {
                                var dom = tinyMCEPopup.dom, b, bStyle, bColor, v, isIE = tinymce.isIE, f = document.forms[0], img = dom.create('img', {style : dom.get('style').value});
                        
                                if (tinyMCEPopup.editor.settings.inline_styles) {
                                    // Handle align
                        Severity: Minor
                        Found in app/lib/tinymce/jscripts/tiny_mce/plugins/advimage/js/image.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 tb_show has a Cognitive Complexity of 77 (exceeds 5 allowed). Consider refactoring.
                        Open

                        function tb_show(caption, url, imageGroup) {//function called when the user clicks on a thickbox link
                        
                            try {
                                if (typeof document.body.style.maxHeight === "undefined") {//if IE 6
                                    jQuery("body","html").css({height: "100%", width: "100%"});
                        Severity: Minor
                        Found in app/admin_files/thickbox.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 Schema has 295 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            tinymce.html.Schema = function(settings) {
                                var self = this, elements = {}, children = {}, patternElements = [], validStyles, schemaItems;
                                var whiteSpaceElementsMap, selfClosingElementsMap, shortEndedElementsMap, boolAttrMap, blockElementsMap, nonEmptyElementsMap, customElementsMap = {};
                        
                                // Creates an lookup table map object for the specified option or the default value
                        Severity: Major
                        Found in app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js - About 1 day to fix

                          Function Schema has 295 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              tinymce.html.Schema = function(settings) {
                                  var self = this, elements = {}, children = {}, patternElements = [], validStyles, schemaItems;
                                  var whiteSpaceElementsMap, selfClosingElementsMap, shortEndedElementsMap, boolAttrMap, blockElementsMap, nonEmptyElementsMap, customElementsMap = {};
                          
                                  // Creates an lookup table map object for the specified option or the default value
                          Severity: Major
                          Found in app/admin_files/wp-tinymce-schema.js - About 1 day to fix

                            Function handleContentEditableSelection has 292 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function handleContentEditableSelection(ed) {
                                    var dom = ed.dom, selection = ed.selection, invisibleChar, caretContainerId = 'mce_noneditablecaret', invisibleChar = '\uFEFF';
                            
                                    // Returns the content editable state of a node "true/false" or null
                                    function getContentEditable(node) {

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

                              /*!
                               * jQuery UI Tabs 1.10.3
                               * http://jqueryui.com
                               *
                               * Copyright 2013 jQuery Foundation and other contributors
                              Severity: Major
                              Found in app/lib/jquery-ui-1.10.3/ui/jquery.ui.tabs.js - About 1 day to fix
                                Severity
                                Category
                                Status
                                Source
                                Language