CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

Avoid deeply nested control flow statements.
Open

                        if (!mysql_query($sql, $this->mysql))
                        {
                            return false;
                        }
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                                while ($row = mysql_fetch_row($query))
                                {
                                    $existing_ids[] = $row[0];
                                }
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                                      if (!($date = $prepared[1][$new_id]->get_date('U')))
                                      {
                                          $date = time();
                                      }
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                        switch (trim($this->data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]['child'][SIMPLEPIE_NAMESPACE_RSS_20]['skiphours']['hour'][0]['data']))
                                        {
                                            case '0':
                                                $this->data['type'] &= SIMPLEPIE_TYPE_RSS_091_NETSCAPE;
                                                break;
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                  if (count($attribs[$j]) === 2)
                                  {
                                      $attribs[$j][2] = $attribs[$j][1];
                                  }
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                            if (isset($category['data']))
                                            {
                                                $term = $this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT);
                                            }
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                              if ($file->success && ($file->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ($file->status_code === 200 || $file->status_code > 206 && $file->status_code < 300)))
                                              {
                                                  if ($cache->save(array('headers' => $file->headers, 'body' => $file->body)))
                                                  {
                                                      $img['attribs']['src']['data'] = $this->image_handler . $image_url;
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                                            if (($body = gzinflate($this->body)) === false)
                                                            {
                                                                $this->error = 'Unable to decode HTTP "deflate" stream';
                                                                $this->success = false;
                                                            }
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 45 mins to fix

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

                      public function is_allowed( $check = 'both', $blog_id = null ) {
                          if ( ! is_multisite() )
                              return true;
                  
                          if ( 'both' == $check || 'network' == $check ) {
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-includes/class-wp-theme.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 get_transient has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function get_transient($transient) {
                      global $_wp_using_ext_object_cache, $wpdb;
                  
                      $pre = apply_filters( 'pre_transient_' . $transient, false );
                      if ( false !== $pre )
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-includes/functions.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 print_scripts_l10n has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                      function print_scripts_l10n( $handle, $echo = true ) {
                          if ( empty($this->registered[$handle]->extra['l10n']) || empty($this->registered[$handle]->extra['l10n'][0]) || !is_array($this->registered[$handle]->extra['l10n'][1]) )
                              return false;
                  
                          $object_name = $this->registered[$handle]->extra['l10n'][0];
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-includes/class.wp-scripts.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

                  Method next_post has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  function next_post($format='%', $next='next post: ', $title='yes', $in_same_cat='no', $limitnext=1, $excluded_categories='') {
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-includes/deprecated.php - About 45 mins to fix

                    Method wpmu_create_blog has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    function wpmu_create_blog( $domain, $path, $title, $user_id, $meta = array(), $site_id = 1 ) {
                    Severity: Minor
                    Found in Web.Admin/2014/wordpress/wp-includes/ms-functions.php - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                                      if ( @is_file( $path . $mce_locale . '_dlg.js' ) )
                                                          $strings .= @file_get_contents( $path . $mce_locale . '_dlg.js' ) . "\n";
                      Severity: Major
                      Found in Web.Admin/2014/wordpress/wp-includes/class-wp-editor.php - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                        if ( ! empty( $strings ) )
                                                            $ext_plugins .= "\n" . $strings . "\n";
                        Severity: Major
                        Found in Web.Admin/2014/wordpress/wp-includes/class-wp-editor.php - About 45 mins to fix

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

                          function delete_usermeta( $user_id, $meta_key, $meta_value = '' ) {
                              global $wpdb;
                              if ( !is_numeric( $user_id ) )
                                  return false;
                              $meta_key = preg_replace('|[^a-z0-9_]|i', '', $meta_key);
                          Severity: Minor
                          Found in Web.Admin/2014/wordpress/wp-includes/user.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

                          Method list_authors has 6 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          function list_authors($optioncount = false, $exclude_admin = true, $show_fullname = false, $hide_empty = true, $feed = '', $feed_image = '') {
                          Severity: Minor
                          Found in Web.Admin/2014/wordpress/wp-includes/deprecated.php - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                            if ( function_exists('realpath') )
                                                                $path = trailingslashit( realpath($path) );
                            Severity: Major
                            Found in Web.Admin/2014/wordpress/wp-includes/class-wp-editor.php - About 45 mins to fix

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

                              function get_page_template() {
                                  $id = get_queried_object_id();
                                  $template = get_page_template_slug();
                                  $pagename = get_query_var('pagename');
                              
                              
                              Severity: Minor
                              Found in Web.Admin/2014/wordpress/wp-includes/template.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 is_serialized has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                              Open

                              function is_serialized( $data ) {
                                  // if it isn't a string, it isn't serialized
                                  if ( !is_string( $data ) )
                                      return false;
                                  $data = trim( $data );
                              Severity: Minor
                              Found in Web.Admin/2014/wordpress/wp-includes/functions.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

                              Severity
                              Category
                              Status
                              Source
                              Language