CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

Method register_controls has 191 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function register_controls() {

        /* Site Title & Tagline */

        $this->add_section( 'title_tagline', array(
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/class-wp-customize-manager.php - About 7 hrs to fix

    Method wp_mce_translation has 190 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public static function wp_mce_translation() {
    
            $mce_translation = array(
                // Default TinyMCE strings
                'New document' => __( 'New document' ),
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/class-wp-editor.php - About 7 hrs to fix

      File module.audio.ogg.php has 483 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.ogg.php - About 7 hrs to fix

        File class-pop3.php has 483 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        /**
         * mail_fetch/setup.php
         *
         * @package SquirrelMail
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-includes/class-pop3.php - About 7 hrs to fix

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

          function _wp_ajax_menu_quick_search( $request = array() ) {
              $args = array();
              $type = isset( $request['type'] ) ? $request['type'] : '';
              $object_type = isset( $request['object_type'] ) ? $request['object_type'] : '';
              $query = isset( $request['q'] ) ? $request['q'] : '';
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-admin/includes/nav-menu.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_plugins has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring.
          Open

          function get_plugins($plugin_folder = '') {
          
              if ( ! $cache_plugins = wp_cache_get('plugins', 'plugins') )
                  $cache_plugins = array();
          
          
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-admin/includes/plugin.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 widget has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring.
          Open

              public function widget( $args, $instance ) {
                  $format = $instance['format'];
          
                  switch ( $format ) {
                      case 'image':

          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 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

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                    galleryAddToolbar: function() {
                        this.toolbar.set( new media.view.Toolbar({
                            controller: this,
                            items: {
                                insert: {
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 7 hrs to fix
            Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 2648..2673

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 186.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                    playlistAddToolbar: function() {
                        this.toolbar.set( new media.view.Toolbar({
                            controller: this,
                            items: {
                                insert: {
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 7 hrs to fix
            Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 2591..2616

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 186.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            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

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                    function SimplePie_Enclosure($link = null, $type = null, $length = null, $javascript = null, $bitrate = null, $captions = null, $categories = null, $channels = null, $copyright = null, $credits = null, $description = null, $duration = null, $expression = null, $framerate = null, $hashes = null, $height = null, $keywords = null, $lang = null, $medium = null, $player = null, $ratings = null, $restrictions = null, $samplingrate = null, $thumbnails = null, $title = null, $width = null)
                    {
                        $this->bitrate = $bitrate;
                        $this->captions = $captions;
                        $this->categories = $categories;
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 1 other location - About 7 hrs to fix
                Web.Admin/2014/wordpress/wp-includes/SimplePie/Enclosure.php on lines 227..262

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 235.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                    public function __construct($link = null, $type = null, $length = null, $javascript = null, $bitrate = null, $captions = null, $categories = null, $channels = null, $copyright = null, $credits = null, $description = null, $duration = null, $expression = null, $framerate = null, $hashes = null, $height = null, $keywords = null, $lang = null, $medium = null, $player = null, $ratings = null, $restrictions = null, $samplingrate = null, $thumbnails = null, $title = null, $width = null)
                    {
                        $this->bitrate = $bitrate;
                        $this->captions = $captions;
                        $this->categories = $categories;
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Enclosure.php and 1 other location - About 7 hrs to fix
                Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 6421..6456

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 235.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                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 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 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

                Severity
                Category
                Status
                Source
                Language