CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

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

function prep_atom_text_construct($data) {
    if (strpos($data, '<') === false && strpos($data, '&') === false) {
        return array('text', $data);
    }

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/feed.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 has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    function get ($msgNum) {
        //  Retrieve the specified msg number. Returns an array
        //  where each line of the msg is an array element.

        if(!isset($this->FP))
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-pop3.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 WP_SimplePie_File has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    function WP_SimplePie_File($url, $timeout = 10, $redirects = 5, $headers = null, $useragent = null, $force_fsockopen = false) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-feed.php - About 45 mins to fix

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

        function build_query_string() {
            $this->query_string = '';
            foreach ( (array) array_keys($this->query_vars) as $wpvar) {
                if ( '' != $this->query_vars[$wpvar] ) {
                    $this->query_string .= (strlen($this->query_string) < 1) ? '' : '&';
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-includes/class-wp.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 wp_check_password has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

    function wp_check_password($password, $hash, $user_id = '') {
        global $wp_hasher;
    
        // If the hash is still md5...
        if ( strlen($hash) <= 32 ) {
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-includes/pluggable.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 SimplePie_Locator has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        function SimplePie_Locator(&$file, $timeout = 10, $useragent = null, $file_class = 'SimplePie_File', $max_checked_feeds = 10, $content_type_sniffer_class = 'SimplePie_Content_Type_Sniffer')
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 45 mins to fix

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

          function percent_encoding_normalization($match)
          {
              $integer = hexdec($match[1]);
              if ($integer >= 0x41 && $integer <= 0x5A || $integer >= 0x61 && $integer <= 0x7A || $integer >= 0x30 && $integer <= 0x39 || $integer === 0x2D || $integer === 0x2E || $integer === 0x5F || $integer === 0x7E)
              {
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.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_title has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

          function get_title()
          {
              if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'title'))
              {
                  return $this->sanitize($return[0]['data'], SimplePie_Misc::atom_10_construct_type($return[0]['attribs']), $this->get_base($return[0]));
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.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 set_scheme has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

          function set_scheme($scheme)
          {
              if ($scheme === null || $scheme === '')
              {
                  $this->scheme = null;
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.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 standalone_value has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

          function standalone_value()
          {
              if ($standalone = $this->get_value())
              {
                  switch ($standalone)
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.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 stripos has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

          function stripos($haystack, $needle, $offset = 0)
          {
              if (function_exists('stripos'))
              {
                  return stripos($haystack, $needle, $offset);
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.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 new_line has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

          function new_line()
          {
              $this->value = trim($this->value, "\x0D\x20");
              if ($this->name !== '' && $this->value !== '')
              {
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.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 wp_redirect has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

      function wp_redirect($location, $status = 302) {
          global $is_IIS;
      
          $location = apply_filters('wp_redirect', $location, $status);
          $status = apply_filters('wp_redirect_status', $status, $location);
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/pluggable.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 set_host has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

          function set_host($host)
          {
              if ($host === null || $host === '')
              {
                  $this->host = null;
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.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 SimplePie_File has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          function SimplePie_File($url, $timeout = 10, $redirects = 5, $headers = null, $useragent = null, $force_fsockopen = false)
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 45 mins to fix

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

        function wp_setcookie($username, $password = '', $already_md5 = false, $home = '', $siteurl = '', $remember = false) {
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-includes/pluggable.php - About 45 mins to fix

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

              function get_language()
              {
                  if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'language'))
                  {
                      return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.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_title has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

              function get_title()
              {
                  if ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'title'))
                  {
                      return $this->sanitize($return[0]['data'], SimplePie_Misc::atom_10_construct_type($return[0]['attribs']), $this->get_base($return[0]));
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.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 (!mysql_query('INSERT INTO `' . $this->options['prefix'][0] . 'items` (`feed_id`, `id`, `data`, `posted`) VALUES(' . $feed_id . ', \'' . mysql_real_escape_string($new_id) . '\', \'' . mysql_real_escape_string(serialize($prepared[1][$new_id]->data)) . '\', ' . $date . ')', $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

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