CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

Function wp_fix_server_vars has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
Open

function wp_fix_server_vars() {
    global $PHP_SELF;

    $default_server_values = array(
        'SERVER_SOFTWARE' => '',
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/load.php - About 4 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 interleave_changed_lines has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
Open

    function interleave_changed_lines( $orig, $final ) {

        // Contains all pairwise string comparisons.  Keys are such that this need only be a one dimensional array.
        $matches = array();
        foreach ( array_keys($orig) as $o ) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/wp-diff.php - About 4 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 wp-settings.php has 356 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * Used to setup and fix common variables and include
 * the WordPress procedural and class library.
 *
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-settings.php - About 4 hrs to fix

    Function study has 113 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      this.study = function (invocables) {
        if (!isObject(invocables)) throw new Error("'invocables' must be an object");
        var invocableKeys = objectKeys(invocables || {});
        
        // Perform a topological sort of invocables to build an ordered plan
    Severity: Major
    Found in Web.Admin/z-scripts/angular-ui-router.js - About 4 hrs to fix

      WP_List_Table has 35 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class WP_List_Table {
      
          /**
           * The current list of items
           *
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-admin/includes/class-wp-list-table.php - About 4 hrs to fix

        SimplePie_Misc has 35 functions (exceeds 20 allowed). Consider refactoring.
        Open

        class SimplePie_Misc
        {
            function time_hms($seconds)
            {
                $time = '';
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 4 hrs to fix

          WP_Rewrite has 35 functions (exceeds 20 allowed). Consider refactoring.
          Open

          class WP_Rewrite {
              /**
               * Default permalink structure for WordPress.
               *
               * @since 1.5.0
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-includes/rewrite.php - About 4 hrs to fix

            Function Sender has 112 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    var Sender = (function () {
                        function Sender(config) {
                            this._buffer = [];
                            this._lastSend = 0;
                            this._config = config;
            Severity: Major
            Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 4 hrs to fix

              Method import_blog has 112 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function import_blog($blogID) {
                      global $importing_blog;
                      $importing_blog = $blogID;
              
                      if ( isset($_GET['authors']) )
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-admin/import/blogger.php - About 4 hrs to fix

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

                    public function Analyze() {
                        $info = &$this->getid3->info;
                
                        $info['fileformat'] = 'quicktime';
                        $info['quicktime']['hinting']    = false;

                  Method parse has 112 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function parse()
                      {
                          if ($this->compressed_size >= $this->min_compressed_size)
                          {
                              // Check ID1, ID2, and CM
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/gzdecode.php - About 4 hrs to fix

                    Method parse has 112 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function parse()
                        {
                            if ($this->compressed_size >= $this->min_compressed_size)
                            {
                                // Check ID1, ID2, and CM
                    Severity: Major
                    Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 4 hrs to fix

                      Function createToolbars has 111 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function createToolbars() {
                              var toolbars = [];
                      
                              function addToolbar(items) {
                                  var toolbarItems = [], buttonGroup;

                        Method wp_dashboard_right_now has 111 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function wp_dashboard_right_now() {
                            global $wp_registered_sidebars;
                        
                            $num_posts = wp_count_posts( 'post' );
                            $num_pages = wp_count_posts( 'page' );
                        Severity: Major
                        Found in Web.Admin/2014/wordpress/wp-admin/includes/dashboard.php - About 4 hrs to fix

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

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

                            Method KnownGUIDs has 111 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public static function KnownGUIDs() {
                                    static $GUIDarray = array(
                                        'GETID3_ASF_Extended_Stream_Properties_Object'   => '14E6A5CB-C672-4332-8399-A96952065B5A',
                                        'GETID3_ASF_Padding_Object'                      => '1806D474-CADF-4509-A4BA-9AABCB96AAE8',
                                        'GETID3_ASF_Payload_Ext_Syst_Pixel_Aspect_Ratio' => '1B1EE554-F9EA-4BC8-821A-376B74E4C4B8',
                            Severity: Major
                            Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio-video.asf.php - About 4 hrs to fix

                              Method get_bookmarks has 111 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function get_bookmarks($args = '') {
                                  global $wpdb;
                              
                                  $defaults = array(
                                      'orderby' => 'name', 'order' => 'ASC',
                              Severity: Major
                              Found in Web.Admin/2014/wordpress/wp-includes/bookmark.php - About 4 hrs to fix

                                File user.php has 351 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                <?php
                                /**
                                 * WordPress User API
                                 *
                                 * @package WordPress
                                Severity: Minor
                                Found in Web.Admin/2014/wordpress/wp-includes/user.php - About 4 hrs to fix

                                  Function updateStyle has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      updateStyle : function(ty) {
                                          var dom = tinyMCEPopup.dom, st, v, f = document.forms[0], img = dom.create('img', {style : f.img_style.value});
                                  
                                          if (tinyMCEPopup.editor.settings.inline_styles) {
                                              // Handle align

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

                                      public function render_screen_options() {
                                          global $wp_meta_boxes, $wp_list_table;
                                  
                                          $columns = get_column_headers( $this );
                                          $hidden  = get_hidden_columns( $this );
                                  Severity: Minor
                                  Found in Web.Admin/2014/wordpress/wp-admin/includes/screen.php - About 4 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

                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language