CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

wp_xmlrpc_server has 62 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/xmlrpc.php - About 1 day to fix

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

    dw_Rotator.addControls = function() {
        var els = dw_getElementsByClassName('rotator_controls');
        for (var i=0; els[i]; i++) {
            var links = els[i].getElementsByTagName('a');
            for (var j=0; links[j]; j++) {
    Severity: Major
    Found in Web.Admin/2015/js/dw_rotator_aux.js and 1 other location - About 1 day to fix
    Web.Admin/2014/js/dw_rotator_aux.js on lines 59..72

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

    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

    dw_Rotator.addControls = function() {
        var els = dw_getElementsByClassName('rotator_controls');
        for (var i=0; els[i]; i++) {
            var links = els[i].getElementsByTagName('a');
            for (var j=0; links[j]; j++) {
    Severity: Major
    Found in Web.Admin/2014/js/dw_rotator_aux.js and 1 other location - About 1 day to fix
    Web.Admin/2015/js/dw_rotator_aux.js on lines 59..72

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

    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

            galleryEditToolbar: function() {
                var editing = this.state().get('editing');
                this.toolbar.set( new media.view.Toolbar({
                    controller: this,
                    items: {
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 1 day to fix
    Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 2618..2646

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

    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

            playlistEditToolbar: function() {
                var editing = this.state().get('editing');
                this.toolbar.set( new media.view.Toolbar({
                    controller: this,
                    items: {
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 1 day to fix
    Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 2561..2589

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

    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 screen.php has 541 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    /**
     * WordPress Administration Screen API.
     *
     * @package WordPress
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-admin/includes/screen.php - About 1 day to fix

      Function inline_edit_row has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring.
      Open

      function inline_edit_row( $type ) {
          global $current_user, $mode;
      
          $is_page = 'page' == $type;
          if ( $is_page ) {
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-admin/includes/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

      Function wp_list_authors has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring.
      Open

      function wp_list_authors($args = '') {
          global $wpdb;
      
          $defaults = array(
              'optioncount' => false, 'exclude_admin' => true,
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/author-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

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

      /**
       * plugin.js
       *
       * Copyright, Moxiecode Systems AB
       * Released under LGPL License.

        Method privParseOptions has 222 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function privParseOptions(&$p_options_list, $p_size, &$v_result_list, $v_requested_options=false)
          {
            $v_result=1;
        
            // ----- Read the options
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-admin/includes/class-pclzip.php - About 1 day to fix

          Method inline_edit_row has 222 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function inline_edit_row( $type ) {
              global $current_user, $mode;
          
              $is_page = 'page' == $type;
              if ( $is_page ) {
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-admin/includes/template.php - About 1 day to fix

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

            if (Prototype.Browser.Opera){
              Array.prototype.concat = function() {
                var array = [];
                for (var i = 0, length = this.length; i < length; i++) array.push(this[i]);
                for (var i = 0, length = arguments.length; i < length; i++) {
            Web.Admin/2014/wordpress/wp-includes/js/prototype.js on lines 940..954

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

            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 (Prototype.Browser.Opera){
              Array.prototype.concat = function() {
                var array = [];
                for (var i = 0, length = this.length; i < length; i++) array.push(this[i]);
                for (var i = 0, length = arguments.length; i < length; i++) {
            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 940..954

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

            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 textpattern.php has 534 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            /**
             * TextPattern Importer
             *
             * @package WordPress
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-admin/import/textpattern.php - About 1 day to fix

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

                      foreach ( $p as $para ) {
                          if ( strpos($para, $pagelinkedto) !== false ) { // it exists, but is it a link?
                              preg_match("|<a[^>]+?".$preg_target."[^>]*>([^>]+?)</a>|", $para, $context);
              
                              // If the URL isn't in a link context, keep looking
              Severity: Major
              Found in Web.Admin/2014/wordpress/xmlrpc.php and 1 other location - About 1 day to fix
              Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 5824..5849

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

              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

                      foreach ( $p as $para ) {
                          if ( strpos($para, $pagelinkedto) !== false ) { // it exists, but is it a link?
                              preg_match("|<a[^>]+?".$preg_target."[^>]*>([^>]+?)</a>|", $para, $context);
              
                              // If the URL isn't in a link context, keep looking
              Web.Admin/2014/wordpress/xmlrpc.php on lines 3326..3351

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

              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 dotclear.php has 532 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              <?php
              /**
               * DotClear Importer
               *
               * @package WordPress
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-admin/import/dotclear.php - About 1 day to fix

                File class.akismet.php has 532 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                <?php
                
                class Akismet {
                    const API_HOST = 'rest.akismet.com';
                    const API_PORT = 80;
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-content/plugins/akismet/class.akismet.php - About 1 day to fix

                  Function Util has 219 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          var Util = (function () {
                              function Util() {
                              }
                              Util._getStorageObject = function () {
                                  try {
                  Severity: Major
                  Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 1 day to fix

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

                      function privCalculateStoredFilename(&$p_filedescr, &$p_options)
                      {
                        $v_result=1;
                    
                        // ----- Working variables
                    Severity: Minor
                    Found in Web.Admin/2014/wordpress/wp-admin/includes/class-pclzip.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

                    Severity
                    Category
                    Status
                    Source
                    Language