CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

Avoid deeply nested control flow statements.
Open

                        if ($framedata{$i} != "\x00") {
                            $thisfile_id3v2['padding']['valid'] = false;
                            $thisfile_id3v2['padding']['errorpos'] = $thisfile_id3v2['padding']['start'] + $i;
                            $info['warning'][] = 'Invalid ID3v2 padding found at offset '.$thisfile_id3v2['padding']['errorpos'].' (the remaining '.($thisfile_id3v2['padding']['length'] - $i).' bytes are considered invalid)';
                            break;
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.tag.id3v2.php - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                                if ($bitratevalue != 'free') {
                                    $bittotal += ($bitratevalue * $bitratecount);
                                }
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio.mp3.php - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                              if ($framecounter == 0) {
                                  $info['error'][] = 'Corrupt MP3 file: framecounter == zero';
                                  return false;
                              }
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio.mp3.php - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                        while ($this->getEBMLelement($subelement, $element_data['end'])) {
                                            switch ($subelement['id']) {
        
                                                case EBML_ID_CUEPOINT:
                                                    $cuepoint_entry = array();
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio-video.matroska.php - About 45 mins to fix

          Function register_controls has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

              public function register_controls() {
          
                  /* Site Title & Tagline */
          
                  $this->add_section( 'title_tagline', array(
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-includes/class-wp-customize-manager.php - About 45 mins 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 ParseID3v2GenreString has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

              public function ParseID3v2GenreString($genrestring) {
                  // Parse genres into arrays of genreName and genreID
                  // ID3v2.2.x, ID3v2.3.x: '(21)' or '(4)Eurodisco' or '(51)(39)' or '(55)((I think...)'
                  // ID3v2.4.x: '21' $00 'Eurodisco' $00
                  $clean_genres = array();
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.tag.id3v2.php - About 45 mins 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

          Avoid deeply nested control flow statements.
          Open

                                              if ($info['mime_type'] == 'video/x-ms-asf') {
                                                  $info['mime_type'] = 'audio/x-ms-wma';
                                              }
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio-video.asf.php - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                        switch ($PictureSizeType) {
                                            case 0:
                                                //$PictureSizeEnc = getid3_lib::BigEndian2Int(substr($FLVvideoHeader, 5, 2));
                                                //$PictureSizeEnc <<= 1;
                                                //$info['video']['resolution_x'] = ($PictureSizeEnc & 0xFF00) >> 8;
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio-video.flv.php - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                      for ($current_segment = 0; $current_segment < $max_scan_segments; $current_segment++) {
                                          $frames_scanned_this_segment = 0;
                                          if (ftell($this->getid3->fp) >= $info['avdataend']) {
                                              break;
                                          }
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio.mp3.php - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                                if (!self::$hide_clusters) {
                                                    $info['matroska']['cluster'][] = $cluster_entry;
                                                }
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio-video.matroska.php - About 45 mins to fix

                  Function getFileSizeSyscall has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public static function getFileSizeSyscall($path) {
                          $filesize = false;
                  
                          if (GETID3_OS_ISWINDOWS) {
                              if (class_exists('COM')) { // From PHP 5.3.15 and 5.4.5, COM and DOTNET is no longer built into the php core.you have to add COM support in php.ini:
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-includes/ID3/getid3.lib.php - About 45 mins 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

                  Avoid deeply nested control flow statements.
                  Open

                                                      if ((strtoupper($filesize) == '<DIR>') && (strtolower($filename) == strtolower($value))) {
                                                          $value = $shortname;
                                                      }
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/wp-includes/ID3/getid3.php - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                                            if ($track_info['dataformat'] == 'mp3' && preg_match('/^Probable truncated file: expecting \d+ bytes of audio data, only found \d+ \(short by \d+ bytes\)$/', $newerror)) {
                                                                // LAME/Xing header is probably set, but audio data is chunked into Matroska file and near-impossible to verify if audio stream is complete, so ignore useless warning
                                                                continue;
                                                            }
                    Severity: Major
                    Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio-video.matroska.php - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                                      if (class_exists('getid3_id3v2')) {
                                                          $tempfile         = tempnam(GETID3_TEMP_DIR, 'getID3');
                                                          $tempfilehandle   = fopen($tempfile, 'wb');
                                                          $tempThisfileInfo = array('encoding'=>$info['encoding']);
                                                          fwrite($tempfilehandle, $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']);
                      Severity: Major
                      Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio-video.asf.php - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                        while ($this->getEBMLelement($track_entry, $element_data['end'])) {
                                                            switch ($track_entry['id']) {
                        
                                                                case EBML_ID_TRACKENTRY: //subelements: Describes a track with all elements.
                        
                        
                        Severity: Major
                        Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio-video.matroska.php - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                          while ($this->getEBMLelement($subelement, $element_data['end'])) {
                                                              switch ($subelement['id']) {
                          
                                                                  case EBML_ID_ATTACHEDFILE:
                                                                      $attachedfile_entry = array();
                          Severity: Major
                          Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio-video.matroska.php - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                                if ($info['mime_type'] == 'video/x-ms-asf') {
                                                                    $info['mime_type'] = 'video/x-ms-wmv';
                                                                }
                            Severity: Major
                            Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio-video.asf.php - About 45 mins to fix

                              Function query has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  function query() {
                                      $args = func_get_args();
                                      $method = array_shift($args);
                                      $request = new IXR_Request($method, $args);
                                      $xml = $request->getXml();
                              Severity: Minor
                              Found in Web.Admin/2014/wordpress/wp-includes/class-wp-http-ixr-client.php - About 45 mins 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

                              Avoid deeply nested control flow statements.
                              Open

                                                  if ( $paged > 1 && !is_single() ) {
                                                      $addl_path = ( !empty( $addl_path ) ? trailingslashit($addl_path) : '' ) . user_trailingslashit("page/$paged", 'paged');
                                                  } elseif ( !is_single() ) {
                                                      $addl_path = ( !empty( $addl_path ) ? trailingslashit($addl_path) : '' ) . user_trailingslashit($paged_redirect['path'], 'paged');
                                                  }
                              Severity: Major
                              Found in Web.Admin/2014/wordpress/wp-includes/canonical.php - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                        if ($SynchErrorsFound > 0) {
                                                            $info['warning'][] = 'Found '.$SynchErrorsFound.' synch errors in histogram analysis';
                                                            //return false;
                                                        }
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio.mp3.php - About 45 mins to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language