CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

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

    function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
        global $_wp_nav_menu_max_depth;
        $_wp_nav_menu_max_depth = $depth > $_wp_nav_menu_max_depth ? $depth : $_wp_nav_menu_max_depth;

        ob_start();
Severity: Major
Found in Web.Admin/2014/wordpress/wp-admin/includes/nav-menu.php - About 6 hrs to fix

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

        function process_post($post) {
            global $wpdb;
    
            $post_ID = (int) $this->get_tag( $post, 'wp:post_id' );
              if ( $post_ID && !empty($this->post_ids_processed[$post_ID]) ) // Processed already
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-admin/import/wordpress.php - About 6 hrs to fix

      WP_Customize_Widgets has 47 functions (exceeds 20 allowed). Consider refactoring.
      Open

      final class WP_Customize_Widgets {
      
          /**
           * WP_Customize_Manager instance.
           *
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/class-wp-customize-widgets.php - About 6 hrs to fix

        File deprecated.php has 437 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        /**
         * Deprecated admin functions from past WordPress versions. You shouldn't use these
         * functions and look for the alternatives instead. The functions will be removed
         * in a later version.
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-admin/includes/deprecated.php - About 6 hrs to fix

          Method _insert_post has 162 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              protected function _insert_post( $user, $content_struct ) {
                  $defaults = array( 'post_status' => 'draft', 'post_type' => 'post', 'post_author' => 0,
                      'post_password' => '', 'post_excerpt' => '', 'post_content' => '', 'post_title' => '' );
          
                  $post_data = wp_parse_args( $content_struct, $defaults );
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php - About 6 hrs to fix

            Method privDeleteByRule has 161 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function privDeleteByRule(&$p_result_list, &$p_options)
              {
                $v_result=1;
                $v_list_detail = array();
            
            
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-admin/includes/class-pclzip.php - About 6 hrs to fix

              Function dispatch has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
              Open

                  function dispatch()
                  {
              
                      if (empty ($_GET['step']))
                          $step = 0;
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-admin/import/dotclear.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 network_step2 has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
              Open

              function network_step2( $errors = false ) {
                  global $wpdb;
              
                  $hostname          = get_clean_basedomain();
                  $slashed_home      = trailingslashit( get_option( 'home' ) );
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-admin/network.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 _shiftBoundaries has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
              Open

                  function _shiftBoundaries($lines, &$changed, $other_changed)
                  {
                      $i = 0;
                      $j = 0;
              
              
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-includes/Text/Diff/Engine/native.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_load_translations_early has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
              Open

              function wp_load_translations_early() {
                  global $text_direction, $wp_locale;
              
                  static $loaded = false;
                  if ( $loaded )
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-includes/load.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 request has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
              Open

                  function request( $url, $args = array() ) {
                      global $wp_version;
              
                      $defaults = array(
                          'method' => 'GET',
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-includes/class-http.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 contingentController has 160 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  var contingentController = function ($scope, $http, $q, $location, modalFactory, dataService) {
                      var url = $location.absUrl();
                      var lastSlash = url.lastIndexOf('/');
                      var province = url.slice(lastSlash + 1);
                      var year = url.slice(lastSlash - 4, lastSlash);
              Severity: Major
              Found in Web.Admin/AdminApp/Controllers/controller.contingent.js - About 6 hrs to fix

                Function QTags has 160 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                var QTags = function(name, id, container, disabled) {
                    var t = this, cont = document.getElementById(container), i, tag, tb, html, sel;
                
                    t.Buttons = [];
                    t.Links = [];
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-includes/js/quicktags.dev.js - About 6 hrs to fix

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

                      insertCode : function(code,replaceCursorBefore) {
                          var range = window.getSelection().getRangeAt(0);
                          var node = window.document.createTextNode(code);
                          var selct = window.getSelection();
                          var range2 = range.cloneRange();
                  Web.Admin/2014/wordpress/wp-includes/js/codepress/engines/gecko.js on lines 216..230

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

                  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

                      insertCode : function(code,replaceCursorBefore) {
                          var range = window.getSelection().getRangeAt(0);
                          var node = window.document.createTextNode(code);
                          var selct = window.getSelection();
                          var range2 = range.cloneRange();
                  Web.Admin/2014/wordpress/wp-includes/js/codepress/engines/opera.js on lines 191..205

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

                  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 wplink.js has 433 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  /* global ajaxurl, tinymce, wpLinkL10n, setUserSetting, wpActiveEditor */
                  var wpLink;
                  
                  ( function( $ ) {
                      var inputs = {}, rivers = {}, editor, searchTimer, River, Query;
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-includes/js/wplink.js - About 6 hrs to fix

                    File mce-view.js has 432 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    /* global tinymce, MediaElementPlayer, WPPlaylistView */
                    /**
                     * Note: this API is "experimental" meaning that it will probably change
                     * in the next few releases based on feedback from 3.9.0.
                     * If you decide to use it, please follow the development closely.
                    Severity: Minor
                    Found in Web.Admin/2014/wordpress/wp-includes/js/mce-view.js - About 6 hrs to fix

                      Method get_media_item has 159 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function get_media_item( $attachment_id, $args = null ) {
                          global $redir_tab;
                      
                          if ( ( $attachment_id = intval($attachment_id) ) && $thumb_url = get_attachment_icon_src( $attachment_id ) )
                              $thumb_url = $thumb_url[0];
                      Severity: Major
                      Found in Web.Admin/2014/wordpress/wp-admin/includes/media.php - About 6 hrs to fix

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

                                    if ($credits = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'credit'))
                                    {
                                        foreach ($credits as $credit)
                                        {
                                            $credit_role = null;
                        Severity: Major
                        Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php and 1 other location - About 6 hrs to fix
                        Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php on lines 1312..1337

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

                        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

                                    elseif ($credits = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'credit'))
                                    {
                                        foreach ($credits as $credit)
                                        {
                                            $credit_role = null;
                        Severity: Major
                        Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php and 1 other location - About 6 hrs to fix
                        Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php on lines 1286..1337

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

                        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