CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

Method media_upload_library_form has 122 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function media_upload_library_form($errors) {
    global $wpdb, $wp_query, $wp_locale, $type, $tab, $post_mime_types;

    media_upload_header();

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

    Method QuicktimeLanguageLookup has 122 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function QuicktimeLanguageLookup($languageid) {
            // http://developer.apple.com/library/mac/#documentation/QuickTime/QTFF/QTFFChap4/qtff4.html#//apple_ref/doc/uid/TP40000939-CH206-34353
            static $QuicktimeLanguageLookup = array();
            if (empty($QuicktimeLanguageLookup)) {
                $QuicktimeLanguageLookup[0]     = 'English';

      Method Handle has 122 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              public IEnumerable Handle(Func<Guid, ParticipantAggregate> al, UpdateParticipant command)
              {
                  var agg = al(command.Id);
      
                  if (agg.Name != command.Name)
      Severity: Major
      Found in Aggregates/Participant/ParticipantCommandHandlers.cs - About 4 hrs to fix

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

                        if (strlen($parsedFrame['data']) > 0) {
                            $parsedFrame['incdec']['center'] = (bool) substr($frame_incrdecrflags, 3, 1);
                            $parsedFrame['volumechange']['center'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, $frame_bytesvolume));
                            if ($parsedFrame['incdec']['center'] === false) {
                                $parsedFrame['volumechange']['center'] *= -1;
        Web.Admin/2014/wordpress/wp-includes/ID3/module.tag.id3v2.php on lines 1201..1210

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

        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

                        if (strlen($parsedFrame['data']) > 0) {
                            $parsedFrame['incdec']['bass'] = (bool) substr($frame_incrdecrflags, 2, 1);
                            $parsedFrame['volumechange']['bass'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, $frame_bytesvolume));
                            if ($parsedFrame['incdec']['bass'] === false) {
                                $parsedFrame['volumechange']['bass'] *= -1;
        Web.Admin/2014/wordpress/wp-includes/ID3/module.tag.id3v2.php on lines 1190..1199

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

        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 media_upload_gallery_form has 120 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function media_upload_gallery_form($errors) {
            global $redir_tab, $type;
        
            $redir_tab = 'gallery';
            media_upload_header();
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-admin/includes/media.php - About 4 hrs to fix

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

          if (!Array.prototype.lastIndexOf) Array.prototype.lastIndexOf = function(item, i) {
            i = isNaN(i) ? this.length : (i < 0 ? this.length + i : i) + 1;
            var n = this.slice(0, i).reverse().indexOf(item);
            return (n < 0) ? n : i - n - 1;
          };
          Web.Admin/2014/wordpress/wp-includes/js/prototype.js on lines 926..930

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

          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

          if (!Array.prototype.lastIndexOf) Array.prototype.lastIndexOf = function(item, i) {
            i = isNaN(i) ? this.length : (i < 0 ? this.length + i : i) + 1;
            var n = this.slice(0, i).reverse().indexOf(item);
            return (n < 0) ? n : i - n - 1;
          };
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js and 1 other location - About 4 hrs to fix
          Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js on lines 926..930

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

          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

          File stepladder_ladies.php has 366 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php 
          include "header.php"; 
          ?> 
          
          <body>
          Severity: Minor
          Found in Web.Admin/2014/stepladder_ladies.php - About 4 hrs to fix

            File stepladder_men.php has 366 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php 
            include "header.php"; 
            ?> 
            
            <body>
            Severity: Minor
            Found in Web.Admin/2015/stepladder_men.php - About 4 hrs to fix

              File stepladder_ladies.php has 366 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              <?php 
              include "header.php"; 
              ?> 
              
              <body>
              Severity: Minor
              Found in Web.Admin/2015/stepladder_ladies.php - About 4 hrs to fix

                File stepladder_men.php has 366 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                <?php 
                include "header.php"; 
                ?> 
                
                <body>
                Severity: Minor
                Found in Web.Admin/2014/stepladder_men.php - About 4 hrs to fix

                  Function transitionTo has 119 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      $state.transitionTo = function transitionTo(to, toParams, options) {
                        toParams = toParams || {};
                        options = extend({
                          location: true, inherit: false, relative: null, notify: true, reload: false, $retry: false
                        }, options || {});
                  Severity: Major
                  Found in Web.Admin/z-scripts/angular-ui-router.js - About 4 hrs to fix

                    Method save has 119 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function save($data)
                        {
                            if ($this->mysql === null)
                            {
                                return false;
                    Severity: Major
                    Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Cache/MySQL.php - About 4 hrs to fix

                      Function add has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                      Open

                        function add($p_filelist)
                        {
                          $v_result=1;
                      
                          // ----- Reset the error handler
                      Severity: Minor
                      Found in Web.Admin/2014/wordpress/wp-admin/includes/class-pclzip.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 check_column has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function check_column($table_name, $col_name, $col_type, $is_null = null, $key = null, $default = null, $extra = null) {
                          global $wpdb, $debug;
                          $diffs = 0;
                          $results = $wpdb->get_results("DESC $table_name");
                      
                      
                      Severity: Minor
                      Found in Web.Admin/2014/wordpress/wp-admin/install-helper.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 load has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function load()
                          {
                              if ($this->mysql === null)
                              {
                                  return false;
                      Severity: Minor
                      Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Cache/MySQL.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 wp_timezone_choice has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function wp_timezone_choice( $selected_zone ) {
                          static $mo_loaded = false;
                      
                          $continents = array( 'Africa', 'America', 'Antarctica', 'Arctic', 'Asia', 'Atlantic', 'Australia', 'Europe', 'Indian', 'Pacific');
                      
                      
                      Severity: Minor
                      Found in Web.Admin/2014/wordpress/wp-includes/functions.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 wp_die has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function wp_die( $message, $title = '', $args = array() ) {
                          global $wp_locale;
                      
                          $defaults = array( 'response' => 500 );
                          $r = wp_parse_args($args, $defaults);
                      Severity: Minor
                      Found in Web.Admin/2014/wordpress/wp-includes/functions.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 Data has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                      Open

                        function Data($msg_data) {
                          $this->error = null; # so no confusion is caused
                      
                          if(!$this->connected()) {
                            $this->error = array(
                      Severity: Minor
                      Found in Web.Admin/2014/wordpress/wp-includes/class-smtp.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