CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

Function get_admin_page_title has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring.
Open

function get_admin_page_title() {
    global $title;
    global $menu;
    global $submenu;
    global $pagenow;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/plugin.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 kubrick_theme_page_head has 202 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function kubrick_theme_page_head() {
?>
<script type="text/javascript" src="../wp-includes/js/colorpicker.js"></script>
<script type='text/javascript'>
// <![CDATA[
Severity: Major
Found in Web.Admin/2014/wordpress/wp-content/themes/default/functions.php - About 1 day to fix

    Method mw_editPost has 201 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

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

      Method redirect_canonical has 201 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function redirect_canonical($requested_url=null, $do_redirect=true) {
          global $wp_rewrite, $is_IIS, $wp_query, $wpdb;
      
          if ( is_trackback() || is_search() || is_comments_popup() || is_admin() || $is_IIS || ( isset($_POST) && count($_POST) ) || is_preview() || is_robots() )
              return;
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-includes/canonical.php - About 1 day to fix

        Methods has 56 functions (exceeds 20 allowed). Consider refactoring.
        Open

        Element.Methods = {
          visible: function(element) {
            return $(element).style.display != 'none';
          },
        
        
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js - About 1 day to fix

          Function tb_show has 200 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function tb_show(caption, url, imageGroup) {//function called when the user clicks on a thickbox link
          
              try {
                  if (typeof document.body.style.maxHeight === "undefined") {//if IE 6
                      jQuery("body","html").css({height: "100%", width: "100%"});
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-includes/js/thickbox/thickbox.js - About 1 day to fix

            Methods has 56 functions (exceeds 20 allowed). Consider refactoring.
            Open

            Element.Methods = {
              visible: function(element) {
                return $(element).style.display != 'none';
              },
            
            
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js - About 1 day to fix

              Method GuessEncoderOptions has 200 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function GuessEncoderOptions() {
                      // shortcuts
                      $info = &$this->getid3->info;
                      if (!empty($info['mpeg']['audio'])) {
                          $thisfile_mpeg_audio = &$info['mpeg']['audio'];
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio.mp3.php - About 1 day to fix

                File cropper.js has 499 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /**
                 * Copyright (c) 2006, David Spurr (http://www.defusion.org.uk/)
                 * All rights reserved.
                 *
                 * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
                Severity: Minor
                Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js - About 1 day to fix

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

                  tinyMCEPopup.requireLangPack();
                  
                  var oldWidth, oldHeight, ed, url;
                  
                  if (url = tinyMCEPopup.getParam("media_external_list_url"))

                    Method privExtractByRule has 198 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      function privExtractByRule(&$p_file_list, $p_path, $p_remove_path, $p_remove_all_path, &$p_options)
                      {
                        $v_result=1;
                    
                        // ----- Magic quotes trick
                    Severity: Major
                    Found in Web.Admin/2014/wordpress/wp-admin/includes/class-pclzip.php - About 7 hrs to fix

                      Function force_balance_tags has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function force_balance_tags( $text ) {
                          $tagstack = array(); $stacksize = 0; $tagqueue = ''; $newtext = '';
                          $single_tags = array('br', 'hr', 'img', 'input'); //Known single-entity/self-closing tags
                          $nestable_tags = array('blockquote', 'div', 'span'); //Tags that can be immediately nested within themselves
                      
                      
                      Severity: Minor
                      Found in Web.Admin/2014/wordpress/wp-includes/formatting.php - About 7 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 class-wp-upgrader-skins.php has 496 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      <?php
                      /**
                       * The User Interface "Skins" for the WordPress File Upgrader
                       *
                       * @package WordPress

                        File quicktags.dev.js has 494 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        // new edit toolbar used with permission
                        // by Alex King
                        // http://www.alexking.org/
                        
                        var edButtons = new Array(), edLinks = new Array(), edOpenTags = new Array(), now = new Date(), datetime;
                        Severity: Minor
                        Found in Web.Admin/2014/wordpress/wp-includes/js/quicktags.dev.js - About 7 hrs to fix

                          Method display_rows has 196 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function display_rows() {
                                  global $post;
                          
                                  add_filter( 'the_title','esc_html' );
                                  $alt = '';

                            Method mw_newPost has 196 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function mw_newPost($args) {
                                    $this->escape($args);
                            
                                    $blog_ID     = (int) $args[0]; // we will support this in the near future
                                    $username  = $args[1];
                            Severity: Major
                            Found in Web.Admin/2014/wordpress/xmlrpc.php - About 7 hrs to fix

                              Method mw_editPost has 196 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

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

                                File wp-fullscreen.js has 493 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                /* global deleteUserSetting, setUserSetting, switchEditors, tinymce, tinyMCEPreInit */
                                /**
                                 * Distraction Free Writing
                                 * (wp-fullscreen)
                                 *
                                Severity: Minor
                                Found in Web.Admin/2014/wordpress/wp-admin/js/wp-fullscreen.js - About 7 hrs to fix

                                  File Entities.php has 493 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  <?php
                                  /**
                                   * SimplePie
                                   *
                                   * A PHP-Based RSS and Atom Feed Framework.

                                    File press-this.php has 492 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    <?php
                                    /**
                                     * Press This Display and Handler.
                                     *
                                     * @package WordPress
                                    Severity: Minor
                                    Found in Web.Admin/2014/wordpress/wp-admin/press-this.php - About 7 hrs to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language