CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

Function upgrade_160 has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring.
Open

function upgrade_160() {
    global $wpdb, $wp_current_db_version;

    populate_roles_160();

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/upgrade.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

Function Analyze has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring.
Open

    public function Analyze() {
        $info = &$this->getid3->info;

        $info['fileformat'] = 'quicktime';
        $info['quicktime']['hinting']    = false;

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

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

    function tag_close($parser, $tag)
    {
        if ($this->current_xhtml_construct >= 0)
        {
            $this->current_xhtml_construct--;
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/Parser.php on lines 347..368

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

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 3 locations. Consider refactoring.
Open

                        if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit']))
                        {
                            foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit'] as $credit)
                            {
                                $credit_role = null;
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php and 2 other locations - About 1 day to fix
Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php on lines 2008..2071
Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php on lines 2038..2067

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

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

    public function tag_close($parser, $tag)
    {
        if ($this->current_xhtml_construct >= 0)
        {
            $this->current_xhtml_construct--;
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Parser.php and 1 other location - About 1 day to fix
Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 14588..14609

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

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 3 locations. Consider refactoring.
Open

                            if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit']))
                            {
                                foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit'] as $credit)
                                {
                                    $credit_role = null;
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php and 2 other locations - About 1 day to fix
Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php on lines 2038..2067
Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php on lines 2560..2593

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

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 3 locations. Consider refactoring.
Open

                            elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit']))
                            {
                                foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit'] as $credit)
                                {
                                    $credit_role = null;
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php and 2 other locations - About 1 day to fix
Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php on lines 2008..2071
Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php on lines 2560..2593

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

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

        _send: function (options, data){
            var _this = this, xhr, uid = _this.uid, onloadFuncName = _this.uid + "Load", url = options.url;

            api.log('XHR._send:', data);

Severity: Major
Found in Web.Admin/z-scripts/FileAPI.js - About 1 day to fix

    Method mw_newPost has 216 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function mw_newPost($args) {
            $this->escape($args);
    
            $blog_ID     = (int) $args[0];
            $username  = $args[1];
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php - About 1 day to fix

      File class-wp-customize-manager.php has 526 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      /**
       * Customize Manager.
       *
       * Bootstraps the Customize experience on the server-side.
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-includes/class-wp-customize-manager.php - About 1 day to fix

        Method Analyze has 215 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function Analyze() {
                $info = &$this->getid3->info;
        
                if (!getid3_lib::intValueSupported($info['filesize'])) {
                    $info['warning'][] = 'Unable to check for APEtags because file is larger than '.round(PHP_INT_MAX / 1073741824).'GB';
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.tag.apetag.php - About 1 day to fix

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

              public function __construct() {
          
                  // Check for PHP version
                  $required_php_version = '5.0.5';
                  if (version_compare(PHP_VERSION, $required_php_version, '<')) {
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-includes/ID3/getid3.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

          File unittest.js has 524 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          // script.aculo.us unittest.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 Jon Tirsen (http://www.tirsen.com)
          //           (c) 2005-2007 Michael Schuerig (http://www.schuerig.de/michael/)
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/unittest.js - About 1 day to fix

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

                function do_paging() {
                    if ( $this->total_users_for_query > $this->users_per_page ) { // have to page the results
                        $args = array();
                        if( ! empty($this->search_term) )
                            $args['usersearch'] = urlencode($this->search_term);
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-admin/includes/deprecated.php and 1 other location - About 1 day to fix
            Web.Admin/2014/wordpress/wp-admin/includes/user.php on lines 708..732

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

            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

                function do_paging() {
                    if ( $this->total_users_for_query > $this->users_per_page ) { // have to page the results
                        $args = array();
                        if( ! empty($this->search_term) )
                            $args['usersearch'] = urlencode($this->search_term);
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-admin/includes/user.php and 1 other location - About 1 day to fix
            Web.Admin/2014/wordpress/wp-admin/includes/deprecated.php on lines 578..602

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

            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

            Method __construct has 214 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function __construct($url, $timeout = 10, $redirects = 5, $headers = null, $useragent = null, $force_fsockopen = false)
                {
                    if (class_exists('idna_convert'))
                    {
                        $idn = new idna_convert();
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/File.php - About 1 day to fix

              File Source.php has 522 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/Source.php - About 1 day to fix

                File admin-bar.php has 520 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                <?php
                /**
                 * Admin Bar
                 *
                 * This code handles the building and rendering of the press bar.
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-includes/admin-bar.php - About 1 day to fix

                  Similar blocks of code found in 3 locations. Consider refactoring.
                  Open

                                          elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit']))
                                          {
                                              foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit'] as $credit)
                                              {
                                                  $credit_role = null;
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 2 other locations - About 1 day to fix
                  Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 4701..4764
                  Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 5250..5283

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

                  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 3 locations. Consider refactoring.
                  Open

                                          if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit']))
                                          {
                                              foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit'] as $credit)
                                              {
                                                  $credit_role = null;
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 2 other locations - About 1 day to fix
                  Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 4701..4764
                  Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 4731..4760

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

                  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