CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

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

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

    Function users2wp has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring.
    Open

        function users2wp($users='')
        {
            // General Housekeeping
            global $wpdb;
            $count = 0;
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-admin/import/dotclear.php - 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

    Function Analyze has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring.
    Open

        public function Analyze() {
            $info = &$this->getid3->info;
    
            $initialOffset = $info['avdataoffset'];
    
    
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio.mp3.php - 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

    Function _createThumbnails has 177 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        _createThumbnails : function( push ) {
    
            this.get( 'total' ).innerHTML = this.getDataLength();
    
            var src,
    Severity: Major
    Found in Web.Admin/2015/js/galleria/galleria-1.4.2.js - About 7 hrs to fix

      Function _createThumbnails has 177 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          _createThumbnails : function( push ) {
      
              this.get( 'total' ).innerHTML = this.getDataLength();
      
              var src,
      Severity: Major
      Found in Web.Admin/Content/galleria/galleria-1.4.2.js - About 7 hrs to fix

        Method ASF_HeaderExtensionObjectDataParse has 177 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function ASF_HeaderExtensionObjectDataParse(&$asf_header_extension_object_data, &$unhandled_sections) {
                // http://msdn.microsoft.com/en-us/library/bb643323.aspx
        
                $offset = 0;
                $objectOffset = 0;
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio-video.asf.php - About 7 hrs to fix

          File class-wp-list-table.php has 461 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          /**
           * Base class for displaying a list of items in an ajaxified HTML table.
           *
           * @package WordPress
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-admin/includes/class-wp-list-table.php - About 7 hrs to fix

            File colorpicker.dev.js has 460 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            // ===================================================================
            // Author: Matt Kruse <matt@mattkruse.com>
            // WWW: http://www.mattkruse.com/
            //
            // NOTICE: You may use this code for any purpose, commercial or
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-includes/js/colorpicker.dev.js - About 7 hrs to fix

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

                      init : function(ed, url) {
                          var t = this, tbId = ed.getParam('wordpress_adv_toolbar', 'toolbar2'), last = 0, moreHTML, nextpageHTML;
                          moreHTML = '<img src="' + url + '/img/trans.gif" class="mceWPmore mceItemNoResize" title="'+ed.getLang('wordpress.wp_more_alt')+'" />';
                          nextpageHTML = '<img src="' + url + '/img/trans.gif" class="mceWPnextpage mceItemNoResize" title="'+ed.getLang('wordpress.wp_page_alt')+'" />';
              
              

                Method _wp_comment_row has 176 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true, $from_ajax = false ) {
                    global $comment, $post, $_comment_pending_count;
                    $comment = get_comment( $comment_id );
                    $post = get_post($comment->comment_post_ID);
                    $the_comment_status = wp_get_comment_status($comment->comment_ID);
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-admin/includes/template.php - About 7 hrs to fix

                  PclZip has 50 functions (exceeds 20 allowed). Consider refactoring.
                  Open

                    class PclZip
                    {
                      // ----- Filename of the zip file
                      var $zipname = '';
                  
                  
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-admin/includes/class-pclzip.php - About 7 hrs to fix

                    Method get_manifest has 175 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function &get_manifest() {
                        global $mce_ver;
                    
                        $files = array(
                            array('images/align-center.png'),
                    Severity: Major
                    Found in Web.Admin/2014/wordpress/wp-admin/includes/manifest.php - About 7 hrs to fix

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

                          fillFileList : function(id, l) {
                              var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
                      
                              l = window[l];
                      
                      
                      Web.Admin/2014/wordpress/wp-includes/js/tinymce/themes/advanced/js/image.js on lines 40..53

                      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 175.

                      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

                          fillFileList : function(id, l) {
                              var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
                      
                              l = window[l];
                      
                      
                      Web.Admin/2014/wordpress/wp-includes/js/tinymce/themes/advanced/js/link.js on lines 100..113

                      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 175.

                      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

                          function mt_getTrackbackPings($args) {
                      
                              global $wpdb;
                      
                              $post_ID = intval($args);
                      Severity: Major
                      Found in Web.Admin/2014/wordpress/xmlrpc.php and 1 other location - About 7 hrs to fix
                      Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 5593..5626

                      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 224.

                      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

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

                        function SendOrMail($from) {
                          $this->error = null; # so no confusion is caused
                      
                          if(!$this->connected()) {
                            $this->error = array(
                      Severity: Major
                      Found in Web.Admin/2014/wordpress/wp-includes/class-smtp.php and 2 other locations - About 7 hrs to fix
                      Web.Admin/2014/wordpress/wp-includes/class-smtp.php on lines 831..861
                      Web.Admin/2014/wordpress/wp-includes/class-smtp.php on lines 879..909

                      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 224.

                      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

                          function mt_getTrackbackPings($args) {
                      
                              global $wpdb;
                      
                              $post_ID = intval($args);
                      Web.Admin/2014/wordpress/xmlrpc.php on lines 3129..3163

                      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 224.

                      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

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

                        function SendAndMail($from) {
                          $this->error = null; # so no confusion is caused
                      
                          if(!$this->connected()) {
                            $this->error = array(
                      Severity: Major
                      Found in Web.Admin/2014/wordpress/wp-includes/class-smtp.php and 2 other locations - About 7 hrs to fix
                      Web.Admin/2014/wordpress/wp-includes/class-smtp.php on lines 831..861
                      Web.Admin/2014/wordpress/wp-includes/class-smtp.php on lines 927..957

                      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 224.

                      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

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

                                  foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'category') as $category)
                                  {
                                      $term = null;
                                      $scheme = null;
                                      $label = null;
                      Severity: Major
                      Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php and 1 other location - About 7 hrs to fix
                      Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php on lines 1204..1226

                      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 224.

                      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

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

                        function Send($from) {
                          $this->error = null; # so no confusion is caused
                      
                          if(!$this->connected()) {
                            $this->error = array(
                      Severity: Major
                      Found in Web.Admin/2014/wordpress/wp-includes/class-smtp.php and 2 other locations - About 7 hrs to fix
                      Web.Admin/2014/wordpress/wp-includes/class-smtp.php on lines 879..909
                      Web.Admin/2014/wordpress/wp-includes/class-smtp.php on lines 927..957

                      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 224.

                      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

                      Severity
                      Category
                      Status
                      Source
                      Language