insideout10/wordlift-plugin-js

View on GitHub

Showing 1,798 of 3,223 total issues

Function moveSelection has 121 lines of code (exceeds 25 allowed). Consider refactoring.
Open

                    function moveSelection(ed, e) {
                        var VK = tinymce.VK;
                        var key = e.keyCode;

                        function handle(upBool, sourceNode, event) {
Severity: Major
Found in app/lib/tinymce/jscripts/tiny_mce/plugins/table/editor_plugin_src.js - About 4 hrs to fix

    Function RangeUtils has 121 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        tinymce.dom.RangeUtils = function(dom) {
            var INVISIBLE_CHAR = '\uFEFF';
    
            this.walk = function(rng, callback) {
                var startContainer = rng.startContainer,
    Severity: Major
    Found in app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js - About 4 hrs to fix

      Function getHTML5 has 121 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function getHTML5() {
              var html5 = mapCache.html5;
      
              if (!html5) {
                  html5 = mapCache.html5 = unpack({
      Severity: Major
      Found in app/admin_files/wp-tinymce-schema.js - About 4 hrs to fix

        TileLayer has 37 functions (exceeds 20 allowed). Consider refactoring.
        Open

        L.TileLayer = L.Class.extend({
            includes: L.Mixin.Events,
        
            options: {
                minZoom: 0,
        Severity: Minor
        Found in bower_components/leaflet/src/layer/tile/TileLayer.js - About 4 hrs to fix

          Function generateCSS has 119 lines of code (exceeds 25 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: Major
          Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js - About 4 hrs to fix

            Function getHTML5 has 119 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function getHTML5() {
                    var html5 = mapCache.html5;
            
                    if (!html5) {
                        html5 = mapCache.html5 = unpack({
            Severity: Major
            Found in app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js - About 4 hrs to fix

              Function support has 119 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              jQuery.support = (function() {
              
                  var support, all, a,
                      input, select, fragment,
                      opt, eventName, isSupported, i,
              Severity: Major
              Found in app/lib/jquery-ui-1.10.3/jquery-1.9.1.js - About 4 hrs to fix

                Function positionMarkers has 118 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

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

                  File table.js has 360 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  tinyMCEPopup.requireLangPack();
                  
                  var action, orgTableWidth, orgTableHeight, dom = tinyMCEPopup.editor.dom;
                  
                  function insertTable() {
                  Severity: Minor
                  Found in app/lib/tinymce/jscripts/tiny_mce/plugins/table/js/table.js - About 4 hrs to fix

                    Function addDoubleTapListener has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                    Open

                        addDoubleTapListener: function (obj, handler, id) {
                            var last,
                                doubleTap = false,
                                delay = 250,
                                touch,
                    Severity: Minor
                    Found in bower_components/leaflet/src/dom/DomEvent.DoubleTap.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 tree has 114 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      d3.layout.tree = function() {
                        var hierarchy = d3.layout.hierarchy().sort(null).value(null), separation = d3_layout_treeSeparation, size = [ 1, 1 ], nodeSize = null;
                        function tree(d, i) {
                          var nodes = hierarchy.call(this, d, i), root0 = nodes[0], root1 = wrapTree(root0);
                          d3_layout_hierarchyVisitAfter(root1, firstWalk), root1.parent.m = -root1.z;
                    Severity: Major
                    Found in app/lib/d3/d3.js - About 4 hrs to fix

                      Function sizeSlides has 114 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              function sizeSlides() {
                                  var i                        = 0,
                                      layout_text_media        = ".slider-item .layout-text-media .media .media-container ",
                                      layout_media            = ".slider-item .layout-media .media .media-container ",
                                      layout_both                = ".slider-item .media .media-container",
                      Severity: Major
                      Found in app/lib/TimelineJS.build/build/js/timeline.js - About 4 hrs to fix

                        Function KeyboardNavigation has 114 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                KeyboardNavigation: function(settings, dom) {
                                    var t = this, root = settings.root, items = settings.items,
                                            enableUpDown = settings.enableUpDown, enableLeftRight = settings.enableLeftRight || !settings.enableUpDown,
                                            excludeFromTabOrder = settings.excludeFromTabOrder,
                                            itemFocussed, itemBlurred, rootKeydown, rootFocussed, focussedId;
                        Severity: Major
                        Found in app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js - About 4 hrs to fix

                          Function diff has 114 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          QUnit.diff = (function() {
                              /*jshint eqeqeq:false, eqnull:true */
                              function diff( o, n ) {
                                  var i,
                                      ns = {},
                          Severity: Major
                          Found in app/lib/jquery-ui-1.10.3/external/qunit.js - About 4 hrs to fix

                            Function nud has 114 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    x.nud = function () {
                                        var b, f, i, p, t;
                                        var props = {}; // All properties, including accessors
                            
                                        function saveProperty(name, token) {
                            Severity: Major
                            Found in app/lib/jquery-ui-1.10.3/external/jshint.js - About 4 hrs to fix

                              Function getBookmark has 113 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      getBookmark : function(type, normalized) {
                                          var t = this, dom = t.dom, rng, rng2, id, collapsed, name, element, index, chr = '\uFEFF', styles;
                              
                                          function findIndex(name, element) {
                                              var index = 0;
                              Severity: Major
                              Found in app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js - About 4 hrs to fix

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

                                        init : function(ed, url) {
                                            var self = this, lookup = {}, i, y, item, name;
                                
                                            function isMediaImg(node) {
                                                return node && node.nodeName === 'IMG' && ed.dom.hasClass(node, 'mceItemMedia');
                                Severity: Major
                                Found in app/lib/tinymce/jscripts/tiny_mce/plugins/media/editor_plugin_src.js - About 4 hrs to fix

                                  Function gallery has 112 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      wp.media.gallery = (function() {
                                          var galleries = {};
                                  
                                          return {
                                              defaults: {
                                  Severity: Major
                                  Found in app/admin_files/media-editor.js - About 4 hrs to fix

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

                                    /*!
                                     * jQuery UI Button 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.button.js - About 4 hrs to fix

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

                                        d3.layout.chord = function() {
                                          var chord = {}, chords, groups, matrix, n, padding = 0, sortGroups, sortSubgroups, sortChords;
                                          function relayout() {
                                            var subgroups = {}, groupSums = [], groupIndex = d3.range(n), subgroupIndex = [], k, x, x0, i, j;
                                            chords = [];
                                      Severity: Major
                                      Found in app/lib/d3/d3.js - About 4 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language