CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

Function parse_request has a Cognitive Complexity of 99 (exceeds 5 allowed). Consider refactoring.
Open

    function parse_request($extra_query_vars = '') {
        global $wp_rewrite;

        /**
         * Filter whether to parse the request.
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-wp.php - About 1 day 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

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

var Form = {
  reset: function(form) {
    $(form).reset();
    return form;
  },
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js and 1 other location - About 1 day to fix
Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js on lines 3342..3371

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 353.

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

var Form = {
  reset: function(form) {
    $(form).reset();
    return form;
  },
Web.Admin/2014/wordpress/wp-includes/js/prototype.js on lines 3342..3371

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 353.

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

File plugin.js has 829 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * Compiled inline version. (Library mode)
 */

/*jshint smarttabs:true, undef:true, latedef:true, curly:true, bitwise:true, camelcase:true */

    Function _wp_menu_item_classes_by_context has a Cognitive Complexity of 98 (exceeds 5 allowed). Consider refactoring.
    Open

    function _wp_menu_item_classes_by_context( &$menu_items ) {
        global $wp_query, $wp_rewrite;
    
        $queried_object = $wp_query->get_queried_object();
        $queried_object_id = (int) $wp_query->queried_object_id;
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-includes/nav-menu-template.php - About 1 day 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

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

    Event.extend = (function() {
      var methods = Object.keys(Event.Methods).inject({ }, function(m, name) {
        m[name] = Event.Methods[name].methodize();
        return m;
      });
    Web.Admin/2014/wordpress/wp-includes/js/prototype.js on lines 3773..3806

    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 349.

    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

    Event.extend = (function() {
      var methods = Object.keys(Event.Methods).inject({ }, function(m, name) {
        m[name] = Event.Methods[name].methodize();
        return m;
      });
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js and 1 other location - About 1 day to fix
    Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js on lines 3773..3806

    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 349.

    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

    Function responsiveNav has 392 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      var responsiveNav = function (el, options) {
    
        var computed = !!window.getComputedStyle;
        
        // getComputedStyle polyfill
    Severity: Major
    Found in Web.Admin/2015/js/responsive-nav.js - About 1 day to fix

      Function responsiveNav has 392 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        var responsiveNav = function (el, options) {
      
          var computed = !!window.getComputedStyle;
          
          // getComputedStyle polyfill
      Severity: Major
      Found in Web.Admin/2014/js/responsive-nav.js - About 1 day to fix

        Similar blocks of code found in 2 locations. 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: Major
        Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 1 other location - About 1 day to fix
        Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 5768..5802

        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 404.

        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

        Similar blocks of code found in 2 locations. 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: Major
        Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 1 other location - About 1 day to fix
        Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 2306..2340

        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 404.

        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

        File revisions.js has 818 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /* global _wpRevisionsSettings, isRtl */
        window.wp = window.wp || {};
        
        (function($) {
            var revisions;
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-admin/js/revisions.js - About 1 day to fix

          File Enclosure.php has 816 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          /**
           * SimplePie
           *
           * A PHP-Based RSS and Atom Feed Framework.
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Enclosure.php - About 1 day to fix

            Function dataService has 385 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                var dataService = function ($http, ngUpload, moment) {
                    return {
                        SaveTeam: saveTeam,
                        RemoveTeam: removeTeam,
                        SaveParticipant: saveParticipant,
            Severity: Major
            Found in Web.Admin/AdminApp/Services/service.data.js - About 1 day to fix

              wp_xmlrpc_server has 100 functions (exceeds 20 allowed). Consider refactoring.
              Open

              class wp_xmlrpc_server extends IXR_Server {
              
                  /**
                   * Register all of the XMLRPC methods that XMLRPC server understands.
                   *
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php - About 1 day to fix

                File controls.js has 804 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                // script.aculo.us controls.js v1.8.0, Tue Nov 06 15:01:40 +0300 2007
                
                // Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
                //           (c) 2005-2007 Ivan Krstic (http://blogs.law.harvard.edu/ivan)
                //           (c) 2005-2007 Jon Tirsen (http://www.tirsen.com)
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/controls.js - About 1 day to fix

                  Function display_rows has a Cognitive Complexity of 95 (exceeds 5 allowed). Consider refactoring.
                  Open

                      function display_rows() {
                          global $post;
                  
                          add_filter( 'the_title','esc_html' );
                          $alt = '';

                  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 GetFileFormatArray has 379 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function GetFileFormatArray() {
                          static $format_info = array();
                          if (empty($format_info)) {
                              $format_info = array(
                  
                  
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/wp-includes/ID3/getid3.php - About 1 day to fix

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

                                if ($keywords = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'keywords'))
                                {
                                    if (isset($keywords[0]['data']))
                                    {
                                        $temp = explode(',', $this->sanitize($keywords[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT));
                    Severity: Major
                    Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 1 other location - About 1 day to fix
                    Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php on lines 1436..1483

                    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 389.

                    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 ($keywords = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'keywords'))
                                {
                                    if (isset($keywords[0]['data']))
                                    {
                                        $temp = explode(',', $this->sanitize($keywords[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT));
                    Severity: Major
                    Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php and 1 other location - About 1 day to fix
                    Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 4135..4182

                    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 389.

                    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