CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

Function import has a Cognitive Complexity of 106 (exceeds 5 allowed). Consider refactoring.
Open

    function import() {
        global $wpdb;

        $wpvarstoreset = array('gmpath', 'archivespath', 'lastentry');
        for ($i=0; $i<count($wpvarstoreset); $i += 1) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/import/greymatter.php - About 2 days 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_comment_row has a Cognitive Complexity of 104 (exceeds 5 allowed). Consider refactoring.
Open

function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true, $from_ajax = false ) {
    global $comment, $post, $_comment_pending_count;
    $comment = get_comment( $comment_id );
    $post = get_post($comment->comment_post_ID);
    $the_comment_status = wp_get_comment_status($comment->comment_ID);
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/template.php - About 2 days 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 customize-controls.js has 859 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* globals _wpCustomizeHeader, _wpMediaViewsL10n */
(function( exports, $ ){
    var api = wp.customize;

    /**
Severity: Major
Found in Web.Admin/2014/wordpress/wp-admin/js/customize-controls.js - About 2 days to fix

    File jquery.Jcrop.dev.js has 859 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**
     * jquery.Jcrop.js v0.9.8
     * jQuery Image Cropping Plugin
     * @author Kelly Hallman <khallman@gmail.com>
     * Copyright (c) 2008-2009 Kelly Hallman - released under MIT License {{{
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/js/jcrop/jquery.Jcrop.dev.js - About 2 days to fix

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

      <?php
      /**
       * Atom Publishing Protocol support for WordPress
       *
       * @author Original by Elias Torres <http://torrez.us/archives/2006/08/31/491/>
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-app.php - About 2 days to fix

        Function _wp_menu_output has a Cognitive Complexity of 103 (exceeds 5 allowed). Consider refactoring.
        Open

        function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) {
            global $self, $parent_file, $submenu_file, $plugin_page, $pagenow;
        
            $first = true;
            // 0 = name, 1 = capability, 2 = file, 3 = class, 4 = id, 5 = icon src
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-admin/menu-header.php - About 2 days 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 blogger.php has 854 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        /**
         * Blogger Importer
         *
         * @package WordPress
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-admin/import/blogger.php - About 2 days to fix

          Function privDeleteByRule has a Cognitive Complexity of 102 (exceeds 5 allowed). Consider refactoring.
          Open

            function privDeleteByRule(&$p_result_list, &$p_options)
            {
              $v_result=1;
              $v_list_detail = array();
          
          
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-admin/includes/class-pclzip.php - About 2 days 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

          SimplePie has 106 functions (exceeds 20 allowed). Consider refactoring.
          Open

          class SimplePie
          {
              /**
               * @var array Raw data
               * @access private
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 2 days to fix

            File IRI.php has 843 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            /**
             * SimplePie
             *
             * A PHP-Based RSS and Atom Feed Framework.
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/IRI.php - About 2 days to fix

              Function mw_newPost has a Cognitive Complexity of 100 (exceeds 5 allowed). Consider refactoring.
              Open

                  function mw_newPost($args) {
                      $this->escape($args);
              
                      $blog_ID     = (int) $args[0];
                      $username  = $args[1];
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php - About 2 days 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 Utils has 401 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  Utils = (function() {
              
                      return {
              
                          // legacy support for clearTimer
              Severity: Major
              Found in Web.Admin/2015/js/galleria/galleria-1.4.2.js - About 2 days to fix

                Function Utils has 401 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    Utils = (function() {
                
                        return {
                
                            // legacy support for clearTimer
                Severity: Major
                Found in Web.Admin/Content/galleria/galleria-1.4.2.js - About 2 days to fix

                  File class-wp-posts-list-table.php has 833 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <?php
                  /**
                   * Posts List Table class.
                   *
                   * @package WordPress

                    File livejournal.php has 830 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    <?php
                    
                    /**
                     * LiveJournal API Importer
                     *
                    Severity: Major
                    Found in Web.Admin/2014/wordpress/wp-admin/import/livejournal.php - About 1 day to fix

                      Function privParseOptions has a Cognitive Complexity of 99 (exceeds 5 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: 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

                      Function wp_mail has a Cognitive Complexity of 99 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() ) {
                          // Compact the input, apply the filters, and extract them back out
                          extract( apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', 'headers', 'attachments' ) ) );
                      
                          if ( !is_array($attachments) )
                      Severity: Minor
                      Found in Web.Admin/2014/wordpress/wp-includes/pluggable.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 parse_request has a Cognitive Complexity of 99 (exceeds 5 allowed). Consider refactoring.
                      Open

                          function parse_request($extra_query_vars = '') {
                              global $wp_rewrite;
                      
                              /**
                               * Filter whether to parse the request.
                      Severity: Minor
                      Found in Web.Admin/2014/wordpress/wp-includes/class-wp.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 829 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      /**
                       * Compiled inline version. (Library mode)
                       */
                      
                      /*jshint smarttabs:true, undef:true, latedef:true, curly:true, bitwise:true, camelcase:true */

                        Function _wp_menu_item_classes_by_context has a Cognitive Complexity of 98 (exceeds 5 allowed). Consider refactoring.
                        Open

                        function _wp_menu_item_classes_by_context( &$menu_items ) {
                            global $wp_query, $wp_rewrite;
                        
                            $queried_object = $wp_query->get_queried_object();
                            $queried_object_id = (int) $wp_query->queried_object_id;
                        Severity: Minor
                        Found in Web.Admin/2014/wordpress/wp-includes/nav-menu-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

                        Severity
                        Category
                        Status
                        Source
                        Language