CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

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

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

        // Shortcuts
        $thisfile_audio = &$info['audio'];
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio-video.asf.php - About 5 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 xmlrpc.php has 2103 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * XML-RPC protocol support for WordPress
 *
 * @license GPL v2 <./license.txt>
Severity: Major
Found in Web.Admin/2014/wordpress/xmlrpc.php - About 5 days to fix

    Function parseEBML has a Cognitive Complexity of 275 (exceeds 5 allowed). Consider refactoring.
    Open

        private function parseEBML(&$info) {
            // http://www.matroska.org/technical/specs/index.html#EBMLBasics
            $this->current_offset = $info['avdataoffset'];
    
            while ($this->getEBMLelement($top_element, $info['avdataend'])) {

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

        public function getOnlyMPEGaudioInfo($avdataoffset, $BitrateHistogram=false) {
            // looks for synch, decodes MPEG audio header
    
            $info = &$this->getid3->info;
    
    
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio.mp3.php - About 5 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

    Method encoding has 1062 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function encoding($charset)
        {
            // Normalization from UTS #22
            switch (strtolower(preg_replace('/(?:[^a-zA-Z0-9]+|([^0-9])0+)/', '\1', $charset)))
            {
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 5 days to fix

      Method encoding has 1060 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public static function encoding($charset)
          {
              // Normalization from UTS #22
              switch (strtolower(preg_replace('/(?:[^a-zA-Z0-9]+|([^0-9])0+)/', '\1', $charset)))
              {
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Misc.php - About 5 days to fix

        File post.php has 1927 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        /**
         * Post functions and post utility function.
         *
         * @package WordPress
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/post.php - About 5 days to fix

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

            File functions.php has 1808 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            /**
             * Main WordPress API
             *
             * @package WordPress
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-includes/functions.php - About 4 days to fix

              Method QuicktimeParseAtom has 983 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function QuicktimeParseAtom($atomname, $atomsize, $atom_data, $baseoffset, &$atomHierarchy, $ParseAllPossibleAtoms) {
                      // http://developer.apple.com/techpubs/quicktime/qtdevdocs/APIREF/INDEX/atomalphaindex.htm
              
                      $info = &$this->getid3->info;
              
              

                Method Analyze has 975 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function Analyze() {
                        $info = &$this->getid3->info;
                
                        // initialize these values to an empty array, otherwise they default to NULL
                        // and you can't append array values to a NULL value
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio-video.riff.php - About 4 days to fix

                  File Misc.php has 1774 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <?php
                  /**
                   * SimplePie
                   *
                   * A PHP-Based RSS and Atom Feed Framework.
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Misc.php - About 4 days to fix

                    File angular-ui-router.js has 1710 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    /**
                     * State-based routing for AngularJS
                     * @version v0.2.15
                     * @link http://angular-ui.github.com/
                     * @license MIT License, http://www.opensource.org/licenses/MIT
                    Severity: Major
                    Found in Web.Admin/z-scripts/angular-ui-router.js - About 4 days to fix

                      Method ParseID3v2Frame has 923 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function ParseID3v2Frame(&$parsedFrame) {
                      
                              // shortcuts
                              $info = &$this->getid3->info;
                              $id3v2_majorversion = $info['id3v2']['majorversion'];
                      Severity: Major
                      Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.tag.id3v2.php - About 4 days to fix

                        Method Analyze has 917 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function Analyze() {
                                $info = &$this->getid3->info;
                        
                                // Shortcuts
                                $thisfile_audio = &$info['audio'];
                        Severity: Major
                        Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio-video.asf.php - About 4 days to fix

                          Function QuicktimeParseAtom has a Cognitive Complexity of 216 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function QuicktimeParseAtom($atomname, $atomsize, $atom_data, $baseoffset, &$atomHierarchy, $ParseAllPossibleAtoms) {
                                  // http://developer.apple.com/techpubs/quicktime/qtdevdocs/APIREF/INDEX/atomalphaindex.htm
                          
                                  $info = &$this->getid3->info;
                          
                          

                          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 bootstrap.js has 1587 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          /*!
                           * Bootstrap v3.3.6 (http://getbootstrap.com)
                           * Copyright 2011-2015 Twitter, Inc.
                           * Licensed under the MIT license
                           */
                          Severity: Major
                          Found in Web.Admin/Content/bootstrap/js/bootstrap.js - About 4 days to fix

                            File ajax-actions.php has 1584 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            <?php
                            /**
                             * WordPress Core Ajax Handlers.
                             *
                             * @package WordPress
                            Severity: Major
                            Found in Web.Admin/2014/wordpress/wp-admin/includes/ajax-actions.php - About 4 days to fix

                              Method wp_print_media_templates has 843 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function wp_print_media_templates() {
                                  global $is_IE;
                                  $class = 'media-modal wp-core-ui';
                                  if ( $is_IE && strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 7') !== false )
                                      $class .= ' ie7';
                              Severity: Major
                              Found in Web.Admin/2014/wordpress/wp-includes/media-template.php - About 4 days to fix

                                Function Jcrop has 835 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                $.Jcrop = function(obj,opt)
                                {
                                    // Initialization {{{
                                
                                    // Sanitize some options {{{
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/js/jcrop/jquery.Jcrop.dev.js - About 4 days to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language