CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

Function request has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
Open

    function request($url, $args = array()) {
        $defaults = array(
            'method' => 'GET', 'timeout' => 5,
            'redirection' => 5, 'httpversion' => '1.0',
            'blocking' => true,
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/http.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 request has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
Open

    function request($url, $args = array()) {
        $defaults = array(
            'method' => 'GET', 'timeout' => 5,
            'redirection' => 5, 'httpversion' => '1.0',
            'blocking' => true,
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/http.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 wp_get_nav_menu_items has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
Open

function wp_get_nav_menu_items( $menu, $args = array() ) {
    $menu = wp_get_nav_menu_object( $menu );

    if ( ! $menu )
        return false;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/nav-menu.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 url_to_postid has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
Open

function url_to_postid($url) {
    global $wp_rewrite;

    $url = apply_filters('url_to_postid', $url);

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/rewrite.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 reservationController has 97 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    var reservationController = function ($scope, $http, $q, $location, modalFactory, dataService, moment) {
        var url = $location.absUrl();
        var lastSlash = url.lastIndexOf('/');
        var province = url.slice(lastSlash + 1);
        var year = url.slice(lastSlash - 4, lastSlash);
Severity: Major
Found in Web.Admin/AdminApp/Controllers/controller.reservation.js - About 3 hrs to fix

    Function registerEventHandlers has 97 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            function registerEventHandlers() {
                editor.on('keydown', function(e) {
                    if (e.isDefaultPrevented()) {
                        return;
                    }

      Method media_upload_form has 97 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function media_upload_form( $errors = null ) {
          global $type, $tab;
      
          $flash_action_url = admin_url('async-upload.php');
      
      
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-admin/includes/media.php - About 3 hrs to fix

        Method column_comment has 97 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function column_comment( $comment ) {
                global $comment_status;
                $post = get_post();
        
                $user_can = $this->user_can;

          Method read_entry has 97 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function read_entry($f, $lineno = 0) {
                  $entry = new Translation_Entry();
                  // where were we in the last step
                  // can be: comment, msgctxt, msgid, msgid_plural, msgstr, msgstr_plural
                  $context = '';
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-includes/pomo/po.php - About 3 hrs to fix

            Function extractFiles has 96 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function extractFiles(evt, callback, allowDir, multiple) {
                    var files = [], rejFiles = [], items = evt.dataTransfer.items, processing = 0;
            
                    function addFile(file) {
                        if (validate(scope, $parse, attr, file, evt)) {
            Severity: Major
            Found in Web.Admin/z-scripts/ng-file-upload-all.js - About 3 hrs to fix

              Function extractFiles has 96 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function extractFiles(evt, callback, allowDir, multiple) {
                      var files = [], rejFiles = [], items = evt.dataTransfer.items, processing = 0;
              
                      function addFile(file) {
                          if (validate(scope, $parse, attr, file, evt)) {
              Severity: Major
              Found in Web.Admin/z-scripts/ng-file-upload.js - About 3 hrs to fix

                Method wp_prepare_revisions_for_js has 96 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function wp_prepare_revisions_for_js( $post, $selected_revision_id, $from = null ) {
                    $post = get_post( $post );
                    $revisions = $authors = array();
                    $now_gmt = time();
                
                
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-admin/includes/revision.php - About 3 hrs to fix

                  Method get_body_class has 96 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function get_body_class( $class = '' ) {
                      global $wp_query, $wpdb, $current_user;
                  
                      $classes = array();
                  
                  
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/wp-includes/post-template.php - About 3 hrs to fix

                    Function DataSanitizer has 95 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                    var DataSanitizer = (function () {
                                        function DataSanitizer() {
                                        }
                                        DataSanitizer.sanitizeKeyAndAddUniqueness = function (key, map) {
                                            var origLength = key.length;
                    Severity: Major
                    Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 3 hrs to fix

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

                      /*
                       * jQuery Form Plugin
                       * version: 2.02 (12/16/2007)
                       * @requires jQuery v1.1 or later
                       *
                      Severity: Minor
                      Found in Web.Admin/2014/wordpress/wp-includes/js/jquery/jquery.form.dev.js - About 3 hrs to fix

                        Function createStates has 95 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                createStates: function() {
                                    var options = this.options;
                        
                                    // Add the default states.
                                    this.states.add([
                        Severity: Major
                        Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js - About 3 hrs to fix

                          File module.audio.ac3.php has 325 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.audio.ac3.php - About 3 hrs to fix

                            File update-core.php has 324 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            <?php
                            /**
                             * Update Core administration panel.
                             *
                             * @package WordPress
                            Severity: Minor
                            Found in Web.Admin/2014/wordpress/wp-admin/update-core.php - About 3 hrs to fix

                              File nav-menu-template.php has 324 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              <?php
                              /**
                               * Navigation Menu template functions
                               *
                               * @package WordPress
                              Severity: Minor
                              Found in Web.Admin/2014/wordpress/wp-includes/nav-menu-template.php - About 3 hrs to fix

                                Function TzDate has 94 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                angular.mock.TzDate = function(offset, timestamp) {
                                  var self = new Date(0);
                                  if (angular.isString(timestamp)) {
                                    var tsStr = timestamp;
                                
                                
                                Severity: Major
                                Found in Web.Admin/z-scripts/angular-mocks.js - About 3 hrs to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language