CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

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 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 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 _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 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 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 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

              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

                    Consider simplifying this complex logical expression.
                    Open

                                    if (
                                        // Invalid sequences
                                        !$valid
                                        // Non-shortest form sequences are invalid
                                        || $length > 1 && $character <= 0x7F
                    Severity: Critical
                    Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/IRI.php - About 6 hrs to fix

                      File wp-db.php has 430 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      <?php
                      /**
                       * WordPress DB Class
                       *
                       * Original code from {@link http://php.justinvincent.com Justin Vincent (justin@visunet.ie)}
                      Severity: Minor
                      Found in Web.Admin/2014/wordpress/wp-includes/wp-db.php - About 6 hrs to fix

                        Method wp_nav_menu_item_taxonomy_meta_box has 157 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function wp_nav_menu_item_taxonomy_meta_box( $object, $taxonomy ) {
                            global $nav_menu_selected_id;
                            $taxonomy_name = $taxonomy['args']->name;
                        
                            // paginate browsing for large numbers of objects
                        Severity: Major
                        Found in Web.Admin/2014/wordpress/wp-admin/includes/nav-menu.php - About 6 hrs to fix

                          Method get_calendar has 157 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function get_calendar($initial = true) {
                              global $wpdb, $m, $monthnum, $year, $wp_locale, $posts;
                          
                              $cache = array();
                              $key = md5( $m . $monthnum . $year );
                          Severity: Major
                          Found in Web.Admin/2014/wordpress/wp-includes/general-template.php - About 6 hrs to fix

                            File theme.js has 428 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

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

                              File class-json.php has 428 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              <?php
                              /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
                              /**
                               * Converts to and from JSON format.
                               *
                              Severity: Minor
                              Found in Web.Admin/2014/wordpress/wp-includes/class-json.php - About 6 hrs to fix
                                Severity
                                Category
                                Status
                                Source
                                Language