CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

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

                if (isset($data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0]))
                {
                    $feed =& $data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0];
                }
                elseif (isset($data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0]))
Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 8987..9006

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

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

ftp_base has 48 functions (exceeds 20 allowed). Consider refactoring.
Open

class ftp_base {
    /* Public variables */
    var $LocalEcho;
    var $Verbose;
    var $OS_local;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/class-ftp.php - About 6 hrs to fix

    File schema.php has 444 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    /**
     * WordPress Administration Scheme API
     *
     * Here we keep the DB structure and option values.
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-admin/includes/schema.php - About 6 hrs to fix

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

          complete : function(trigger) {
              window.getSelection().getRangeAt(0).deleteContents();
              var complete = Language.complete;
              for (var i=0; i<complete.length; i++) {
                  if(complete[i].input == trigger) {
      Web.Admin/2014/wordpress/wp-includes/js/codepress/engines/gecko.js on lines 153..163

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

      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

          complete : function(trigger) {
              window.getSelection().getRangeAt(0).deleteContents();
              var complete = Language.complete;
              for (var i=0; i<complete.length; i++) {
                  if(complete[i].input == trigger) {
      Web.Admin/2014/wordpress/wp-includes/js/codepress/engines/opera.js on lines 153..163

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

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

      wp.svgPainter = ( function( $, window, document, undefined ) {
          'use strict';
          var selector, base64, painter,
              colorscheme = {},
              elements = [];
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-admin/js/svg-painter.js - About 6 hrs to fix

        Function Selection has 165 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            var Selection = function()/*{{{*/
            {
                var start, end, dragmode, awake, hdep = 370;
                var borders = { };
                var handle = { };
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/js/jcrop/jquery.Jcrop.dev.js - About 6 hrs to fix

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

          if ( ( $total_pages = ceil( $total / 50 ) ) > 1 ) {
              for ( $page_num = 1; $page_num <= $total_pages; $page_num++ ) :
                  if ( $page == $page_num ) :
                      $r .=  "<strong>$page_num</strong>\n";
                  else :
          Web.Admin/2014/wordpress/wp-content/plugins/akismet/akismet.php on lines 852..868

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

          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 ( ( $total_pages = ceil( $total / 50 ) ) > 1 ) {
              for ( $page_num = 1; $page_num <= $total_pages; $page_num++ ) :
                  if ( $page == $page_num ) :
                      $r .=  "<strong>$page_num</strong>\n";
                  else :
          Web.Admin/2014/wordpress/wp-content/plugins/akismet/akismet.php on lines 785..801

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

          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 http_version()
              {
                  if (strpos($this->data, "\x0A") !== false && strtoupper(substr($this->data, 0, 5)) === 'HTTP/')
                  {
                      $len = strspn($this->data, '0123456789.', 5);
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 1 other location - About 6 hrs to fix
          Web.Admin/2014/wordpress/wp-includes/SimplePie/HTTP/Parser.php on lines 197..219

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

          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 Noop() {
              $this->error = null; # so no confusion is caused
          
              if(!$this->connected()) {
                $this->error = array(
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-includes/class-smtp.php and 1 other location - About 6 hrs to fix
          Web.Admin/2014/wordpress/wp-includes/class-smtp.php on lines 782..813

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

          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 Reset() {
              $this->error = null; # so no confusion is caused
          
              if(!$this->connected()) {
                $this->error = array(
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-includes/class-smtp.php and 1 other location - About 6 hrs to fix
          Web.Admin/2014/wordpress/wp-includes/class-smtp.php on lines 641..671

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

          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

              protected function http_version()
              {
                  if (strpos($this->data, "\x0A") !== false && strtoupper(substr($this->data, 0, 5)) === 'HTTP/')
                  {
                      $len = strspn($this->data, '0123456789.', 5);
          Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 8029..8051

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

          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 id has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring.
          Open

              id: function(nodes, root, id, combinator) {
                var targetNode = $(id), h = Selector.handlers;
                if (!targetNode) return [];
                if (!nodes && root == document) return [targetNode];
                if (nodes) {
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js - About 6 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 id has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring.
          Open

              id: function(nodes, root, id, combinator) {
                var targetNode = $(id), h = Selector.handlers;
                if (!targetNode) return [];
                if (!nodes && root == document) return [targetNode];
                if (nodes) {
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js - About 6 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 confirm_delete_users has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring.
          Open

          function confirm_delete_users( $users ) {
              $current_user = wp_get_current_user();
              if ( !is_array( $users ) )
                  return false;
              ?>
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-admin/network/users.php - About 6 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 absolutize has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring.
          Open

              public static function absolutize($base, $relative)
              {
                  if (!($relative instanceof SimplePie_IRI))
                  {
                      $relative = new SimplePie_IRI($relative);
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/IRI.php - About 6 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 wp_nav_menu has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring.
          Open

          function wp_nav_menu( $args = array() ) {
              static $menu_id_slugs = array();
          
              $defaults = array( 'menu' => '', 'container' => 'div', 'container_class' => '', 'container_id' => '', 'menu_class' => 'menu', 'menu_id' => '',
              'echo' => true, 'fallback_cb' => 'wp_page_menu', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>',
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-includes/nav-menu-template.php - About 6 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 network.php has 440 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          /**
           * Network installation administration panel.
           *
           * A multi-step process allowing the user to enable a network of WordPress sites.
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-admin/network.php - About 6 hrs to fix

            Method wp_tiny_mce has 163 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function wp_tiny_mce( $teeny = false, $settings = false ) {
                global $concatenate_scripts, $compress_scripts, $tinymce_version;
            
                if ( ! user_can_richedit() )
                    return;
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-admin/includes/post.php - About 6 hrs to fix
              Severity
              Category
              Status
              Source
              Language