CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

File module.audio.ac3.php has 325 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/////////////////////////////////////////////////////////////////
/// getID3() by James Heinrich <info@getid3.org>               //
//  available at http://getid3.sourceforge.net                 //
//            or http://www.getid3.org                         //
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio.ac3.php - About 3 hrs to fix

    Identical blocks of code found in 3 locations. Consider refactoring.
    Open

        getLastWord : function() {
            var rangeAndCaret = CodePress.getRangeAndCaret();
            words = rangeAndCaret[0].substring(rangeAndCaret[1]-40,rangeAndCaret[1]);
            words = words.replace(/[\s\n\r\);\W]/g,'\n').split('\n');
            return words[words.length-1].replace(/[\W]/gi,'').toLowerCase();
    Web.Admin/2014/wordpress/wp-includes/js/codepress/engines/gecko.js on lines 125..130
    Web.Admin/2014/wordpress/wp-includes/js/codepress/engines/opera.js on lines 125..130

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 111.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 3 locations. Consider refactoring.
    Open

        getLastWord : function() {
            var rangeAndCaret = CodePress.getRangeAndCaret();
            words = rangeAndCaret[0].substring(rangeAndCaret[1]-40,rangeAndCaret[1]);
            words = words.replace(/[\s\n\r\);\W]/g,'\n').split('\n');
            return words[words.length-1].replace(/[\W]/gi,'').toLowerCase();
    Web.Admin/2014/wordpress/wp-includes/js/codepress/engines/gecko.js on lines 125..130
    Web.Admin/2014/wordpress/wp-includes/js/codepress/engines/msie.js on lines 214..219

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 111.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

    dw_Rotator.prototype.doImageTrans = function(imgObj) {
        imgObj.style.filter = 'blendTrans(duration=1)';
        if (imgObj.filters.blendTrans) imgObj.filters.blendTrans.Apply();
        imgObj.src = this.imgs[this.ctr].src;
        imgObj.filters.blendTrans.Play(); 
    Severity: Major
    Found in Web.Admin/2015/js/dw_rotator.js and 1 other location - About 3 hrs to fix
    Web.Admin/2014/js/dw_rotator.js on lines 92..97

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 111.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 3 locations. Consider refactoring.
    Open

        getLastWord : function() {
            var rangeAndCaret = CodePress.getRangeAndCaret();
            words = rangeAndCaret[0].substring(rangeAndCaret[1]-40,rangeAndCaret[1]);
            words = words.replace(/[\s\n\r\);\W]/g,'\n').split('\n');
            return words[words.length-1].replace(/[\W]/gi,'').toLowerCase();
    Web.Admin/2014/wordpress/wp-includes/js/codepress/engines/msie.js on lines 214..219
    Web.Admin/2014/wordpress/wp-includes/js/codepress/engines/opera.js on lines 125..130

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 111.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

    dw_Rotator.prototype.doImageTrans = function(imgObj) {
        imgObj.style.filter = 'blendTrans(duration=1)';
        if (imgObj.filters.blendTrans) imgObj.filters.blendTrans.Apply();
        imgObj.src = this.imgs[this.ctr].src;
        imgObj.filters.blendTrans.Play(); 
    Severity: Major
    Found in Web.Admin/2014/js/dw_rotator.js and 1 other location - About 3 hrs to fix
    Web.Admin/2015/js/dw_rotator.js on lines 92..97

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 111.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

    Selection.refresh();};$hdl_holder.hide();interfaceUpdate(true);var api={animateTo:animateTo,setSelect:setSelect,setOptions:setOptionsNew,tellSelect:tellSelect,tellScaled:tellScaled,disable:disableCrop,enable:enableCrop,cancel:cancelCrop,focus:KeyManager.watchKeys,getBounds:function(){return[boundx*xscale,boundy*yscale];},getWidgetSize:function(){return[boundx,boundy];},release:Selection.release,destroy:destroy};$origimg.data('Jcrop',api);return api;};$.fn.Jcrop=function(options)
    Web.Admin/2014/wordpress/wp-includes/js/jcrop/jquery.Jcrop.dev.js on lines 1140..1159

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 111.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

        var api = {
            animateTo: animateTo,
            setSelect: setSelect,
            setOptions: setOptionsNew,
            tellSelect: tellSelect,
    Web.Admin/2014/wordpress/wp-includes/js/jcrop/jquery.Jcrop.js on lines 158..158

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 111.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    File update-core.php has 324 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    /**
     * Update Core administration panel.
     *
     * @package WordPress
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-admin/update-core.php - About 3 hrs to fix

      File nav-menu-template.php has 324 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      /**
       * Navigation Menu template functions
       *
       * @package WordPress
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/nav-menu-template.php - About 3 hrs to fix

        Function TzDate has 94 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        angular.mock.TzDate = function(offset, timestamp) {
          var self = new Date(0);
          if (angular.isString(timestamp)) {
            var tsStr = timestamp;
        
        
        Severity: Major
        Found in Web.Admin/z-scripts/angular-mocks.js - About 3 hrs to fix

          Function Hash has 94 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          var Hash = Class.create(Enumerable, (function() {
            if (function() {
              var i = 0, Test = function(value) { this.key = value };
              Test.prototype.key = 'foo';
              for (var property in new Test('bar')) i++;
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js - About 3 hrs to fix

            Function Hash has 94 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            var Hash = Class.create(Enumerable, (function() {
              if (function() {
                var i = 0, Test = function(value) { this.key = value };
                Test.prototype.key = 'foo';
                for (var property in new Test('bar')) i++;
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js - About 3 hrs to fix

              Method remove_iunreserved_percent_encoded has 94 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  protected function remove_iunreserved_percent_encoded($match)
                  {
                      // As we just have valid percent encoded sequences we can just explode
                      // and ignore the first member of the returned array (an empty string).
                      $bytes = explode('%', $match[0]);
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/IRI.php - About 3 hrs to fix

                Method gallery_shortcode has 94 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function gallery_shortcode($attr) {
                    global $post, $wp_locale;
                
                    static $instance = 0;
                    $instance++;
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-includes/media.php - About 3 hrs to fix

                  Function PclZipUtilPathInclusion has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
                  Open

                    function PclZipUtilPathInclusion($p_dir, $p_path)
                    {
                      $v_result = 1;
                  
                      // ----- Look for path beginning by ./
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-admin/includes/class-pclzip.php - About 3 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 display_themes has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function display_themes($themes, $page = 1, $totalpages = 1) {
                      global $themes_allowedtags;
                  
                      $type = isset($_REQUEST['type']) ? stripslashes( $_REQUEST['type'] ) : '';
                      $term = isset($_REQUEST['s']) ? stripslashes( $_REQUEST['s'] ) : '';
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-admin/includes/theme-install.php - About 3 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 single_row has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
                  Open

                      function single_row( $user_object, $style = '', $role = '', $numposts = 0 ) {
                          global $wp_roles;
                  
                          if ( !( is_object( $user_object ) && is_a( $user_object, 'WP_User' ) ) )
                              $user_object = get_userdata( (int) $user_object );

                  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 dirlist has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
                  Open

                      function dirlist($path = '.', $include_hidden = true, $recursive = false) {
                          if ( $this->is_file($path) ) {
                              $limit_file = basename($path);
                              $path = dirname($path) . '/';
                          } else {

                  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 display_rows has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
                  Open

                      function display_rows() {
                          global $cat_id;
                  
                          $alt = 0;
                  
                  

                  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