CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

File media.php has 1498 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * WordPress Administration Media API.
 *
 * @package WordPress
Severity: Major
Found in Web.Admin/2014/wordpress/wp-admin/includes/media.php - About 3 days to fix

    Function editor_settings has a Cognitive Complexity of 195 (exceeds 5 allowed). Consider refactoring.
    Open

        public static function editor_settings($editor_id, $set) {
            $first_run = false;
    
            if ( empty(self::$first_init) ) {
                if ( is_admin() ) {
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-includes/class-wp-editor.php - About 3 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 init has a Cognitive Complexity of 194 (exceeds 5 allowed). Consider refactoring.
    Open

        function init()
        {
            // Check absolute bare minimum requirements.
            if ((function_exists('version_compare') && version_compare(PHP_VERSION, '4.3.0', '<')) || !extension_loaded('xml') || !extension_loaded('pcre'))
            {
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 3 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

    File module.tag.id3v2.php has 1484 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: Major
    Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.tag.id3v2.php - About 3 days to fix

      File formatting.php has 1483 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      /**
       * Main WordPress Formatting API.
       *
       * Handles many functions for formatting output.
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-includes/formatting.php - About 3 days to fix

        File module.audio-video.riff.php has 1460 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: Major
        Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio-video.riff.php - About 3 days to fix

          File query.php has 1447 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          /**
           * WordPress Query API
           *
           * The query API attempts to get which part of WordPress to the user is on. It
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-includes/query.php - About 3 days to fix

            File module.audio.mp3.php has 1430 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: Major
            Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio.mp3.php - About 3 days to fix

              File module.audio-video.matroska.php has 1419 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                         //

                Function decodeMPEGaudioHeader has a Cognitive Complexity of 181 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function decodeMPEGaudioHeader($offset, &$info, $recursivesearch=true, $ScanAsCBR=false, $FastMPEGheaderScan=false) {
                        static $MPEGaudioVersionLookup;
                        static $MPEGaudioLayerLookup;
                        static $MPEGaudioBitrateLookup;
                        static $MPEGaudioFrequencyLookup;
                Severity: Minor
                Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio.mp3.php - About 3 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

                File module.audio-video.asf.php has 1378 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: Major
                Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio-video.asf.php - About 3 days to fix

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

                      public function Analyze()
                      {
                          $info = &$this->getid3->info;
                  
                          // parse container

                  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

                  Method get_posts has 678 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function &get_posts() {
                          global $wpdb, $user_ID;
                  
                          do_action_ref_array('pre_get_posts', array(&$this));
                  
                  
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/wp-includes/query.php - About 3 days to fix

                    Function redirect_canonical has a Cognitive Complexity of 160 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function redirect_canonical($requested_url=null, $do_redirect=true) {
                        global $wp_rewrite, $is_IIS, $wp_query, $wpdb;
                    
                        if ( is_trackback() || is_search() || is_comments_popup() || is_admin() || $is_IIS || ( isset($_POST) && count($_POST) ) || is_preview() || is_robots() )
                            return;
                    Severity: Minor
                    Found in Web.Admin/2014/wordpress/wp-includes/canonical.php - About 3 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 ParseRIFF has a Cognitive Complexity of 160 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function ParseRIFF($startoffset, $maxoffset) {
                            $info = &$this->getid3->info;
                    
                            $RIFFchunk = false;
                            $FoundAllChunksWeNeed = false;
                    Severity: Minor
                    Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio-video.riff.php - About 3 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

                    File getid3.php has 1242 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: Major
                    Found in Web.Admin/2014/wordpress/wp-includes/ID3/getid3.php - About 3 days to fix

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

                          public function Analyze() {
                              $info = &$this->getid3->info;
                      
                              //    Overall tag structure:
                              //        +-----------------------------+
                      Severity: Minor
                      Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.tag.id3v2.php - About 3 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 parse_query has a Cognitive Complexity of 154 (exceeds 5 allowed). Consider refactoring.
                      Open

                          function parse_query ($query) {
                              if ( !empty($query) || !isset($this->query) ) {
                                  $this->init();
                                  if ( is_array($query) )
                                      $this->query_vars = $query;
                      Severity: Minor
                      Found in Web.Admin/2014/wordpress/wp-includes/query.php - About 3 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

                      Consider simplifying this complex logical expression.
                      Open

                              if (isset($parsedFrame['datalength']) && ($parsedFrame['datalength'] == 0)) {
                      
                                  $warning = 'Frame "'.$parsedFrame['frame_name'].'" at offset '.$parsedFrame['dataoffset'].' has no data portion';
                                  switch ($parsedFrame['frame_name']) {
                                      case 'WCOM':
                      Severity: Critical
                      Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.tag.id3v2.php - About 3 days to fix

                        Function akismet_caught has a Cognitive Complexity of 150 (exceeds 5 allowed). Consider refactoring.
                        Open

                        function akismet_caught() {
                            global $wpdb, $comment, $akismet_caught, $akismet_nonce;
                        
                            akismet_recheck_queue();
                            if (isset($_POST['submit']) && 'recover' == $_POST['action'] && ! empty($_POST['not_spam'])) {
                        Severity: Minor
                        Found in Web.Admin/2014/wordpress/wp-content/plugins/akismet/akismet.php - About 3 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

                        Severity
                        Category
                        Status
                        Source
                        Language