CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

Avoid deeply nested control flow statements.
Open

if(_50.y<this.startCoords.y1){
_52.y=-1;
}
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

          if(element.tagName == 'IMG' && element.width) {
            element.width++; element.width--;
          } else try {
            var n = document.createTextNode(' ');
            element.appendChild(n);
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                } else if (combinator == 'adjacent') {
                  for (var i = 0, node; node = nodes[i]; i++)
                    if (Selector.handlers.previousElementSibling(targetNode) == node)
                      return [targetNode];
                } else nodes = h[combinator](nodes);
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js - About 45 mins to fix

        Function Methods has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
        Open

        Event.Methods = (function() {
          var isButton;
        
          if (Prototype.Browser.IE) {
            var buttonMap = { 0: 1, 1: 4, 2: 2 };
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js - About 45 mins 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 createControl has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
        Open

          createControl: function(mode, handler, extraClasses) {
            var control = this.options[mode + 'Control'];
            var text = this.options[mode + 'Text'];
            if ('button' == control) {
              var btn = document.createElement('input');
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/controls.js - About 45 mins 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

        Avoid deeply nested control flow statements.
        Open

        if(_50.x<this.startCoords.x2){
        _52.x=-1;
        }
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                        if (targetNode.parentNode == node) return [targetNode];
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                        for (var i = 0, node; node = nodes[i]; i++)
                          if (Element.descendantOf(targetNode, node)) return [targetNode];
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js - About 45 mins to fix

              Function show has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

                show: function(point, element) {
                  if(!this.drops.length) return;
                  var drop, affected = [];
                  
                  this.drops.each( function(drop) {
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/dragdrop.js - About 45 mins 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 a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

                _tree: function(element, options, parent) {
                  var children = Sortable.findElements(element, options) || [];
                
                  for (var i = 0; i < children.length; ++i) {
                    var match = children[i].id.match(options.format);
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/dragdrop.js - About 45 mins 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 loadGallery has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              function loadGallery(folioGallerydir,targetdiv,album,numperpage,pagenum,fullalbum) {                    
              Severity: Minor
              Found in Web.Admin/2014/foliogallery/foliogallery.js - About 45 mins to fix

                Function schedule has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                Open

                function schedule() {
                    var now = new Date();
                    var date = now.getDate();
                    var month = now.getMonth();
                    var month = month + 1;
                Severity: Minor
                Found in Web.Admin/2018/js/schedule.js - About 45 mins 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 create has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                Open

                  create: function(element) {
                    element = $(element);
                    var options = Object.extend({ 
                      element:     element,
                      tag:         'li',       // assumes li children, override with tag: 'tagname'
                Severity: Minor
                Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/dragdrop.js - About 45 mins 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 loop has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                Open

                  loop: function(timePos) {
                    if (timePos >= this.startOn) {
                      if (timePos >= this.finishOn) {
                        this.render(1.0);
                        this.cancel();
                Severity: Minor
                Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/effects.js - About 45 mins 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 loadFlash has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                Open

                    SWFUpload.prototype.loadFlash = function (oldLoadFlash) {
                        return function () {
                            var hasFlash = swfobject.hasFlashPlayerVersion(this.settings.minimum_flash_version);
                            
                            if (hasFlash) {

                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 edButton has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                function edButton(id, display, tagStart, tagEnd, access, open) {
                Severity: Minor
                Found in Web.Admin/2014/wordpress/wp-includes/js/quicktags.dev.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                for(attr in arguments[1]) 
                                  element[attr == 'class' ? 'className' : attr] = arguments[1][attr];
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/builder.js - About 45 mins to fix

                    Function schedule has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function schedule() {
                        var now = new Date();
                        var date = now.getDate();
                        var month = now.getMonth();
                        var month = month + 1;
                    Severity: Minor
                    Found in Web.Admin/2022/js/schedule.js - About 45 mins 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

                    Avoid deeply nested control flow statements.
                    Open

                                                            if ( type == 'image' && !current.big ) {
                                                                current.big = current.image;
                                                            }
                    Severity: Major
                    Found in Web.Admin/Content/galleria/galleria-1.4.2.js - About 45 mins to fix

                      Function install_themes_dashboard has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function install_themes_dashboard() {
                          install_theme_search_form();
                      ?>
                      <h4><?php _e('Feature Filter') ?></h4>
                      <form method="post" action="<?php echo admin_url( 'theme-install.php?tab=search' ); ?>">
                      Severity: Minor
                      Found in Web.Admin/2014/wordpress/wp-admin/includes/theme-install.php - About 45 mins 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