CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

Function getLyrics3Data has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring.
Open

    public function getLyrics3Data($endoffset, $version, $length) {
        // http://www.volweb.cz/str/tags.htm

        $info = &$this->getid3->info;

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.tag.lyrics3.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

Function request has a Cognitive Complexity of 49 (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/class-http.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

Method wp_nav_menu_item_post_type_meta_box has 189 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function wp_nav_menu_item_post_type_meta_box( $object, $post_type ) {
    global $_nav_menu_placeholder, $nav_menu_selected_id;

    $post_type_name = $post_type['args']->name;

Severity: Major
Found in Web.Admin/2014/wordpress/wp-admin/includes/nav-menu.php - About 7 hrs to fix

    Method post_submit_meta_box has 188 lines of code (exceeds 25 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: Major
    Found in Web.Admin/2014/wordpress/wp-admin/includes/meta-boxes.php - About 7 hrs to fix

      Method embed has 188 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function embed($options = '', $native = false)
          {
              // Set up defaults
              $audio = '';
              $video = '';
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Enclosure.php - About 7 hrs to fix

        Function edit_user has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring.
        Open

        function edit_user( $user_id = 0 ) {
            global $current_user, $wp_roles, $wpdb;
            if ( $user_id != 0 ) {
                $update = true;
                $user->ID = (int) $user_id;
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-admin/includes/user.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

        Function bulk_edit_posts has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring.
        Open

        function bulk_edit_posts( $post_data = null ) {
            global $wpdb;
        
            if ( empty($post_data) )
                $post_data = &$_POST;
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-admin/includes/post.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

        Function parseMETAdata has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring.
        Open

            public function parseMETAdata() {
                $info = &$this->getid3->info;
                do {
                    $BlockOffset   = $this->ftell();
                    $BlockHeader   = $this->fread(4);
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio.flac.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

        Function get_avatar has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring.
        Open

        function get_avatar( $id_or_email, $size = '96', $default = '', $alt = false ) {
            if ( ! get_option('show_avatars') )
                return false;
        
            if ( false === $alt)
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-includes/pluggable.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

        Function paged_walk has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring.
        Open

            function paged_walk( $elements, $max_depth, $page_num, $per_page ) {
        
                /* sanity check */
                if ( empty($elements) || $max_depth < -1 )
                    return '';
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-includes/class-wp-walker.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

        Function paged_walk has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring.
        Open

            function paged_walk( $elements, $max_depth, $page_num, $per_page ) {
        
                /* sanity check */
                if ( empty($elements) || $max_depth < -1 )
                    return '';
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-includes/classes.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

        Method request has 185 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function request($url, $args = array()) {
                $defaults = array(
                    'method' => 'GET', 'timeout' => 5,
                    'redirection' => 5, 'httpversion' => '1.0',
                    'blocking' => true,
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/class-http.php - About 7 hrs to fix

          File plugins.php has 474 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          /**
           * Plugins administration panel.
           *
           * @package WordPress
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-admin/plugins.php - About 7 hrs to fix

            File category-template.php has 474 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            /**
             * Category Template Tags and API.
             *
             * @package WordPress
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-includes/category-template.php - About 7 hrs to fix

              Method network_step2 has 184 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function network_step2( $errors = false ) {
                  global $wpdb;
              
                  $hostname          = get_clean_basedomain();
                  $slashed_home      = trailingslashit( get_option( 'home' ) );
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-admin/network.php - About 7 hrs to fix

                Consider simplifying this complex logical expression.
                Open

                            if (sizeof($this->data['enclosures']) === 0 && ($url || $type || $length || $bitrate || $captions_parent || $categories_parent || $channels || $copyrights_parent || $credits_parent || $description_parent || $duration_parent || $expression || $framerate || $hashes_parent || $height || $keywords_parent || $lang || $medium || $player_parent || $ratings_parent || $restrictions_parent || $samplingrate || $thumbnails_parent || $title_parent || $width))
                            {
                                // Since we don't have group or content for these, we'll just pass the '*_parent' variables directly to the constructor
                                $this->data['enclosures'][] = $this->registry->create('Enclosure', array($url, $type, $length, null, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title_parent, $width));
                            }
                Severity: Critical
                Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php - About 7 hrs to fix

                  Consider simplifying this complex logical expression.
                  Open

                              if (sizeof($this->data['enclosures']) === 0 && ($url || $type || $length || $bitrate || $captions_parent || $categories_parent || $channels || $copyrights_parent || $credits_parent || $description_parent || $duration_parent || $expression || $framerate || $hashes_parent || $height || $keywords_parent || $lang || $medium || $player_parent || $ratings_parent || $restrictions_parent || $samplingrate || $thumbnails_parent || $title_parent || $width))
                              {
                                  // Since we don't have group or content for these, we'll just pass the '*_parent' variables directly to the constructor
                                  $this->data['enclosures'][] =& new $this->feed->enclosure_class($url, $type, $length, $this->feed->javascript, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title_parent, $width);
                              }
                  Severity: Critical
                  Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 7 hrs to fix

                    File editimage.js has 472 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    
                    var tinymce = null, tinyMCEPopup, tinyMCE;
                    
                    tinyMCEPopup = {
                        init: function() {

                      Function Coords has 183 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          var Coords = function()/*{{{*/
                          {
                              var x1 = 0, y1 = 0, x2 = 0, y2 = 0, ox, oy;
                      
                              function setPressed(pos)/*{{{*/
                      Severity: Major
                      Found in Web.Admin/2014/wordpress/wp-includes/js/jcrop/jquery.Jcrop.dev.js - About 7 hrs to fix

                        File ms.php has 471 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        <?php
                        /**
                         * Multisite administration functions.
                         *
                         * @package WordPress
                        Severity: Minor
                        Found in Web.Admin/2014/wordpress/wp-admin/includes/ms.php - About 7 hrs to fix
                          Severity
                          Category
                          Status
                          Source
                          Language