CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

Function autodiscovery has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
Open

    function autodiscovery()
    {
        $links = array_merge(SimplePie_Misc::get_element('link', $this->file->body), SimplePie_Misc::get_element('a', $this->file->body), SimplePie_Misc::get_element('area', $this->file->body));
        $done = array();
        $feeds = array();
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 3 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

Function get_authors has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
Open

    function get_authors()
    {
        $authors = array();
        foreach ((array) $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'author') as $author)
        {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 3 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

Function get_authors has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
Open

    function get_authors()
    {
        $authors = array();
        foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'author') as $author)
        {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 3 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

Function walk has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
Open

    function walk( $elements, $max_depth) {

        $args = array_slice(func_get_args(), 2);
        $output = '';

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-wp-walker.php - About 3 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

Function wpmu_validate_user_signup has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
Open

function wpmu_validate_user_signup($user_name, $user_email) {
    global $wpdb;

    $errors = new WP_Error();

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ms-functions.php - About 3 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

Function add_query_arg has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
Open

function add_query_arg() {
    $ret = '';
    if ( is_array( func_get_arg(0) ) ) {
        if ( @func_num_args() < 2 || false === @func_get_arg( 1 ) )
            $uri = $_SERVER['REQUEST_URI'];
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/functions.php - About 3 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

Function add has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
Open

    function add( $args = '' ) {
        $defaults = array(
            'what' => 'object', 'action' => false,
            'id' => '0', 'old_id' => false,
            'position' => 1,
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-wp-ajax-response.php - About 3 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

Function utf8_uri_encode has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
Open

function utf8_uri_encode( $utf8_string, $length = 0 ) {
    $unicode = '';
    $values = array();
    $num_octets = 1;
    $unicode_length = 0;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/formatting.php - About 3 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

Function add has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
Open

    function add( $args = '' ) {
        $defaults = array(
            'what' => 'object', 'action' => false,
            'id' => '0', 'old_id' => false,
            'position' => 1,
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/classes.php - About 3 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

Function __construct has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
Open

    function __construct( $data, $requested_url = '' ) {
        if ( $requested_url )
            $arrURL = @parse_url( $requested_url );
        if ( isset( $arrURL['host'] ) )
            $this->domain = $arrURL['host'];
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-http.php - About 3 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

Function walk has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
Open

    function walk( $elements, $max_depth) {

        $args = array_slice(func_get_args(), 2);
        $output = '';

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/classes.php - About 3 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 widgets.php has 309 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * Widgets administration panel.
 *
 * @package WordPress
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/widgets.php - About 3 hrs to fix

    Function History has 85 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    Galleria.History = (function() {
    
        var onloads = [],
    
            init = false,
    Severity: Major
    Found in Web.Admin/2015/js/galleria/plugins/history/galleria.history.js - About 3 hrs to fix

      Function History has 85 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      Galleria.History = (function() {
      
          var onloads = [],
      
              init = false,
      Severity: Major
      Found in Web.Admin/Content/galleria/plugins/history/galleria.history.js - About 3 hrs to fix

        Method xml_encoding has 85 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public static function xml_encoding($data, $registry)
            {
                // UTF-32 Big Endian BOM
                if (substr($data, 0, 4) === "\x00\x00\xFE\xFF")
                {
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Misc.php - About 3 hrs to fix

          Method fetch_rss has 85 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function fetch_rss ($url) {
              // initialize constants
              init();
          
              if ( !isset($url) ) {
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-includes/rss.php - About 3 hrs to fix

            Method wp_list_post_revisions has 85 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function wp_list_post_revisions( $post_id = 0, $args = null ) {
                if ( !$post = get_post( $post_id ) )
                    return;
            
                $defaults = array( 'parent' => false, 'right' => false, 'left' => false, 'format' => 'list', 'type' => 'all' );
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-includes/post-template.php - About 3 hrs to fix

              Method xml_encoding has 85 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function xml_encoding($data)
                  {
                      // UTF-32 Big Endian BOM
                      if (substr($data, 0, 4) === "\x00\x00\xFE\xFF")
                      {
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 3 hrs to fix

                Method MultiByteCharString2HTML has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public static function MultiByteCharString2HTML($string, $charset='ISO-8859-1') {
                        $string = (string) $string; // in case trying to pass a numeric (float, int) string, would otherwise return an empty string
                        $HTMLstring = '';
                
                        switch ($charset) {
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-includes/ID3/getid3.lib.php - About 3 hrs to fix

                  Method feed_start_element has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function feed_start_element($p, $element, &$attrs) {
                          $el = $element = strtolower($element);
                          $attrs = array_change_key_case($attrs, CASE_LOWER);
                  
                          // check for a namespace, and split if found
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/wp-includes/rss.php - About 3 hrs to fix
                    Severity
                    Category
                    Status
                    Source
                    Language