CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

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 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 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 __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 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_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/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 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 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 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 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

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                    getCompleteEndingChars : function() {
                        var cChars = '';
                        for(var i=0;i<Language.complete.length;i++)
                            cChars += '|'+Language.complete[i].output.charAt(Language.complete[i].output.length-1);
                        return cChars+'|';
                Web.Admin/2014/wordpress/wp-includes/js/codepress/engines/msie.js on lines 179..184

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 103.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                    getCompleteEndingChars : function() {
                        var cChars = '';
                        for(var i=0;i<Language.complete.length;i++)
                            cChars += '|'+Language.complete[i].output.charAt(Language.complete[i].output.length-1);
                        return cChars+'|';
                Web.Admin/2014/wordpress/wp-includes/js/codepress/engines/gecko.js on lines 172..177

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 103.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                        if ( ! $this->is_theme_active() ) {
                            add_filter( 'template', array( $this, 'get_template' ) );
                            add_filter( 'stylesheet', array( $this, 'get_stylesheet' ) );
                            add_filter( 'pre_option_current_theme', array( $this, 'current_theme' ) );
                
                
                Web.Admin/2014/wordpress/wp-includes/class-wp-customize-manager.php on lines 249..261

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 150.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                    if ($p_header['mdate'] && $p_header['mtime'])
                    {
                      // ----- Extract time
                      $v_hour = ($p_header['mtime'] & 0xF800) >> 11;
                      $v_minute = ($p_header['mtime'] & 0x07E0) >> 5;
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-admin/includes/class-pclzip.php and 1 other location - About 3 hrs to fix
                Web.Admin/2014/wordpress/wp-admin/includes/class-pclzip.php on lines 4434..4453

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 150.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                        if ( ! $this->is_theme_active() ) {
                            remove_filter( 'template', array( $this, 'get_template' ) );
                            remove_filter( 'stylesheet', array( $this, 'get_stylesheet' ) );
                            remove_filter( 'pre_option_current_theme', array( $this, 'current_theme' ) );
                
                
                Web.Admin/2014/wordpress/wp-includes/class-wp-customize-manager.php on lines 212..224

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 150.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Severity
                Category
                Status
                Source
                Language