CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

Function wpmu_validate_blog_signup has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
Open

function wpmu_validate_blog_signup( $blogname, $blog_title, $user = '' ) {
    global $wpdb, $domain;

    $current_site = get_current_site();
    $base = $current_site->path;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ms-functions.php - About 3 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 get_permalink has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
Open

function get_permalink($id = 0, $leavename = false) {
    $rewritecode = array(
        '%year%',
        '%monthnum%',
        '%day%',
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/link-template.php - About 3 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 start_el has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
Open

    function start_el(&$output, $category, $depth, $args) {
        extract($args);

        $cat_name = esc_attr( $category->name);
        $cat_name = apply_filters( 'list_cats', $cat_name, $category );
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/classes.php - About 3 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 editor_plugin.dev.js has 302 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * WordPress plugin.
 */

(function() {

    File module.tag.id3v1.php has 302 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    /////////////////////////////////////////////////////////////////
    /// getID3() by James Heinrich <info@getid3.org>               //
    //  available at http://getid3.sourceforge.net                 //
    //            or http://www.getid3.org                         //
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.tag.id3v1.php - About 3 hrs to fix

      Function _setupReorderUI has 81 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              _setupReorderUI: function() {
                  var self = this, selectSidebarItem, $moveWidgetArea,
                      $reorderNav, updateAvailableSidebars;
      
                  /**
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-admin/js/customize-widgets.js - About 3 hrs to fix

        Function addToolbar has 81 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                function addToolbar(items) {
                    var toolbarItems = [], buttonGroup;
        
                    if (!items) {
                        return;

          Method install_theme_information has 81 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function install_theme_information() {
              //TODO: This function needs a LOT of UI work :)
              global $tab, $themes_allowedtags;
          
              $api = themes_api('theme_information', array('slug' => stripslashes( $_REQUEST['theme'] ) ));
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-admin/includes/theme-install.php - About 3 hrs to fix

            Method convert_categories has 81 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function convert_categories() {
                    global $wpdb;
            
                    if ( (!isset($_POST['cats_to_convert']) || !is_array($_POST['cats_to_convert'])) && empty($this->categories_to_convert)) { ?>
                        <div class="narrow">
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-admin/import/wp-cat2tag.php - About 3 hrs to fix

              Method mw_getPost has 81 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function mw_getPost($args) {
              
                      $this->escape($args);
              
                      $post_ID     = (int) $args[0];
              Severity: Major
              Found in Web.Admin/2014/wordpress/xmlrpc.php - About 3 hrs to fix

                Method customize_register has 81 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function customize_register() {
                        global $wp_registered_widgets, $wp_registered_widget_controls, $wp_registered_sidebars;
                
                        $sidebars_widgets = array_merge(
                            array( 'wp_inactive_widgets' => array() ),
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-includes/class-wp-customize-widgets.php - About 3 hrs to fix

                  File MySQL.php has 301 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <?php
                  /**
                   * SimplePie
                   *
                   * A PHP-Based RSS and Atom Feed Framework.
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Cache/MySQL.php - About 3 hrs to fix

                    Function init has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            init: function() {
                                var toolbar;
                    
                                s.toolbar = toolbar = $('#fullscreen-topbar');
                                s.$fullscreenFader = $('#fullscreen-fader');
                    Severity: Major
                    Found in Web.Admin/2014/wordpress/wp-admin/js/wp-fullscreen.js - About 3 hrs to fix

                      Function renderInlineUI has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function renderInlineUI(args) {
                              var panel, inlineToolbarContainer;
                      
                              if (settings.fixed_toolbar_container) {
                                  inlineToolbarContainer = DOM.select(settings.fixed_toolbar_container)[0];

                        Method extractByIndex has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          function extractByIndex($p_index)
                          {
                            $v_result=1;
                        
                            // ----- Reset the error handler
                        Severity: Major
                        Found in Web.Admin/2014/wordpress/wp-admin/includes/class-pclzip.php - About 3 hrs to fix

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

                              function __construct() {
                                  $this->methods = array(
                                      // WordPress API
                                      'wp.getUsersBlogs'        => 'this:wp_getUsersBlogs',
                                      'wp.newPost'            => 'this:wp_newPost',
                          Severity: Major
                          Found in Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php - About 3 hrs to fix

                            Method paged_walk has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function paged_walk( $elements, $max_depth, $page_num, $per_page ) {
                            
                                    /* sanity check */
                                    if ( empty($elements) || $max_depth < -1 )
                                        return '';
                            Severity: Major
                            Found in Web.Admin/2014/wordpress/wp-includes/class-wp-walker.php - About 3 hrs to fix

                              Method paged_walk has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  function paged_walk( $elements, $max_depth, $page_num, $per_page ) {
                              
                                      /* sanity check */
                                      if ( empty($elements) || $max_depth < -1 )
                                          return '';
                              Severity: Major
                              Found in Web.Admin/2014/wordpress/wp-includes/classes.php - About 3 hrs to fix

                                SimplePie_IRI has 27 functions (exceeds 20 allowed). Consider refactoring.
                                Open

                                class SimplePie_IRI
                                {
                                    /**
                                     * Scheme
                                     *
                                Severity: Minor
                                Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/IRI.php - About 3 hrs to fix

                                  Class TournamentQueries has 27 methods (exceeds 20 allowed). Consider refactoring.
                                  Open

                                      public class TournamentQueries : BaseReadModel<TournamentQueries>,
                                          IReadModel,
                                          ITournamentQueries,
                                          ISubscribeTo<TournamentCreated>,
                                          ISubscribeTo<ChangeNotificationCutoffChanged>,
                                  Severity: Minor
                                  Found in ReadModels/TournamentQueries.cs - About 3 hrs to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language