CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

Function parse_request has a Cognitive Complexity of 73 (exceeds 5 allowed). Consider refactoring.
Open

    function parse_request($extra_query_vars = '') {
        global $wp_rewrite;

        $this->query_vars = array();
        $taxonomy_query_vars = array();
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/classes.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 wordpress.php has 646 lines of code (exceeds 250 allowed). Consider refactoring.
Open

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

    Function get_media_item has a Cognitive Complexity of 72 (exceeds 5 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: Minor
    Found in Web.Admin/2014/wordpress/wp-admin/includes/media.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 showDialog has 282 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function showDialog(imageList) {
            var win, data = {}, dom = editor.dom, imgElm = editor.selection.getNode();
            var width, height, imageListCtrl, classListCtrl;
    
            function buildValues(listSettingName, dataItemName, defaultItems) {

      File theme.php has 636 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      /**
       * Theme, template, and stylesheet functions.
       *
       * @package WordPress
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-includes/theme.php - About 1 day to fix

        Function post_submit_meta_box has a Cognitive Complexity of 71 (exceeds 5 allowed). Consider refactoring.
        Open

        function post_submit_meta_box($post) {
            global $action;
        
            $post_type = $post->post_type;
            $can_publish = current_user_can("publish_${post_type}s");
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-admin/includes/meta-boxes.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

        Method Analyze has 281 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function Analyze() {
                $info = &$this->getid3->info;
        
                //    Overall tag structure:
                //        +-----------------------------+
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.tag.id3v2.php - About 1 day to fix

          Method init has 279 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function init()
              {
                  // Check absolute bare minimum requirements.
                  if ((function_exists('version_compare') && version_compare(PHP_VERSION, '4.3.0', '<')) || !extension_loaded('xml') || !extension_loaded('pcre'))
                  {
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 1 day to fix

            File rss.php has 629 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            /**
             * MagpieRSS: a simple RSS integration tool
             *
             * A compiled file for RSS syndication
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-includes/rss.php - About 1 day to fix

              Function update has a Cognitive Complexity of 70 (exceeds 5 allowed). Consider refactoring.
              Open

                  update : function() {
                      var t = this, f = document.forms[0], ed = tinyMCEPopup.editor, el, b, fixSafari = null, DL, P, A, DIV, do_caption = null, img_class = f.img_classes.value, html;
              
                      tinyMCEPopup.restoreSelection();
                      el = ed.selection.getNode();

              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 embed has a Cognitive Complexity of 70 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function embed($options = '', $native = false)
                  {
                      // Set up defaults
                      $audio = '';
                      $video = '';
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Enclosure.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 save has a Cognitive Complexity of 70 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function save($data)
                  {
                      if ($this->mysql === null)
                      {
                          return false;
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Cache/MySQL.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 comment-template.php has 628 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              <?php
              /**
               * Comment template functions
               *
               * These functions are meant to live inside of the WordPress loop.
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-includes/comment-template.php - About 1 day to fix

                Method akismet_caught has 275 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function akismet_caught() {
                    global $wpdb, $comment, $akismet_caught, $akismet_nonce;
                
                    akismet_recheck_queue();
                    if (isset($_POST['submit']) && 'recover' == $_POST['action'] && ! empty($_POST['not_spam'])) {
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-content/plugins/akismet/akismet.php - About 1 day to fix

                  File media-audiovideo.js has 621 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  /* global _wpMediaViewsL10n, _wpmejsSettings, MediaElementPlayer */
                  
                  (function($, _, Backbone) {
                      var media = wp.media,
                          baseSettings = {},
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/wp-includes/js/media-audiovideo.js - About 1 day to fix

                    File media.php has 620 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    <?php
                    /**
                     * WordPress API for media display.
                     *
                     * @package WordPress
                    Severity: Major
                    Found in Web.Admin/2014/wordpress/wp-includes/media.php - About 1 day to fix

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

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

                        Function display_rows has a Cognitive Complexity of 68 (exceeds 5 allowed). Consider refactoring.
                        Open

                            function display_rows() {
                                global $mode;
                        
                                $alt = '';
                                $super_admins = get_super_admins();

                        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 kubrick_add_theme_page has a Cognitive Complexity of 68 (exceeds 5 allowed). Consider refactoring.
                        Open

                        function kubrick_add_theme_page() {
                            if ( isset( $_GET['page'] ) && $_GET['page'] == basename(__FILE__) ) {
                                if ( isset( $_REQUEST['action'] ) && 'save' == $_REQUEST['action'] ) {
                                    check_admin_referer('kubrick-header');
                                    if ( isset($_REQUEST['njform']) ) {
                        Severity: Minor
                        Found in Web.Admin/2014/wordpress/wp-content/themes/default/functions.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

                        Method wp_default_scripts has 268 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function wp_default_scripts( &$scripts ) {
                        
                            if ( !$guessurl = site_url() )
                                $guessurl = wp_guess_url();
                        
                        
                        Severity: Major
                        Found in Web.Admin/2014/wordpress/wp-includes/script-loader.php - About 1 day to fix
                          Severity
                          Category
                          Status
                          Source
                          Language