CaffGeek/MBACNationals

View on GitHub
Web.Admin/2014/wordpress/wp-includes/ID3/module.audio.ac3.php

Summary

Maintainability
D
1 day
Test Coverage

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

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

        ///AH
        $info['ac3']['raw']['bsi'] = array();
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio.ac3.php - About 5 hrs to fix

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

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

    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

      Method frameSizeLookup has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public static function frameSizeLookup($frmsizecod, $fscod) {
              $padding     = (bool) ($frmsizecod % 2);
              $framesizeid =   floor($frmsizecod / 2);
      
              static $frameSizeLookup = array();
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio.ac3.php - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status