CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

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

var Hash = Class.create(Enumerable, (function() {
  if (function() {
    var i = 0, Test = function(value) { this.key = value };
    Test.prototype.key = 'foo';
    for (var property in new Test('bar')) i++;
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js and 1 other location - About 5 days to fix
Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js on lines 986..1098

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

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

var Hash = Class.create(Enumerable, (function() {
  if (function() {
    var i = 0, Test = function(value) { this.key = value };
    Test.prototype.key = 'foo';
    for (var property in new Test('bar')) i++;
Web.Admin/2014/wordpress/wp-includes/js/prototype.js on lines 986..1098

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

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

    private function parseEBML(&$info) {
        // http://www.matroska.org/technical/specs/index.html#EBMLBasics
        $this->current_offset = $info['avdataoffset'];

        while ($this->getEBMLelement($top_element, $info['avdataend'])) {

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

    public function getOnlyMPEGaudioInfo($avdataoffset, $BitrateHistogram=false) {
        // looks for synch, decodes MPEG audio header

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

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio.mp3.php - About 5 days 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 encoding has 1062 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function encoding($charset)
    {
        // Normalization from UTS #22
        switch (strtolower(preg_replace('/(?:[^a-zA-Z0-9]+|([^0-9])0+)/', '\1', $charset)))
        {
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 5 days to fix

    Method encoding has 1060 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public static function encoding($charset)
        {
            // Normalization from UTS #22
            switch (strtolower(preg_replace('/(?:[^a-zA-Z0-9]+|([^0-9])0+)/', '\1', $charset)))
            {
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Misc.php - About 5 days to fix

      File post.php has 1927 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      /**
       * Post functions and post utility function.
       *
       * @package WordPress
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-includes/post.php - About 5 days to fix

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

        (function($) {
        
        /*global window, jQuery, Galleria */
        
        Galleria.addTheme({
        Severity: Major
        Found in Web.Admin/2015/js/galleria/themes/classic/galleria.classic.js and 1 other location - About 5 days to fix
        Web.Admin/Content/galleria/themes/classic/galleria.classic.js on lines 10..100

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

        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

        (function($) {
        
        /*global window, jQuery, Galleria */
        
        Galleria.addTheme({
        Severity: Major
        Found in Web.Admin/Content/galleria/themes/classic/galleria.classic.js and 1 other location - About 5 days to fix
        Web.Admin/2015/js/galleria/themes/classic/galleria.classic.js on lines 10..100

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

        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 ($is_windows && preg_match("/([0-9]{2})-([0-9]{2})-([0-9]{2}) +([0-9]{2}):([0-9]{2})(AM|PM) +([0-9]+|<DIR>) +(.+)/",$line,$lucifer)) {
                    $b = array();
                    if ($lucifer[3]<70) { $lucifer[3]+=2000; } else { $lucifer[3]+=1900; } // 4digit year fix
                    $b['isdir'] = ($lucifer[7]=="<DIR>");
                    if ( $b['isdir'] )
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-admin/includes/class-ftp.php and 1 other location - About 5 days to fix
        Web.Admin/2014/wordpress/wp-admin/includes/class-wp-filesystem-ftpext.php on lines 266..321

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

        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 ( $is_windows && preg_match("/([0-9]{2})-([0-9]{2})-([0-9]{2}) +([0-9]{2}):([0-9]{2})(AM|PM) +([0-9]+|<DIR>) +(.+)/", $line, $lucifer) ) {
                    $b = array();
                    if ( $lucifer[3] < 70 ) { $lucifer[3] +=2000; } else { $lucifer[3] += 1900; } // 4digit year fix
                    $b['isdir'] = ($lucifer[7]=="<DIR>");
                    if ( $b['isdir'] )
        Web.Admin/2014/wordpress/wp-admin/includes/class-ftp.php on lines 166..221

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

        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

        Form.Methods = {
          serialize: function(form, options) {
            return Form.serializeElements(Form.getElements(form), options);
          },
        
        
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js and 1 other location - About 5 days to fix
        Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js on lines 3373..3452

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

        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

        Form.Methods = {
          serialize: function(form, options) {
            return Form.serializeElements(Form.getElements(form), options);
          },
        
        
        Web.Admin/2014/wordpress/wp-includes/js/prototype.js on lines 3373..3452

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

        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 module.audio-video.quicktime.php has 1830 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                         //

          File functions.php has 1808 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          /**
           * Main WordPress API
           *
           * @package WordPress
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-includes/functions.php - About 4 days to fix

            Method QuicktimeParseAtom has 983 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function QuicktimeParseAtom($atomname, $atomsize, $atom_data, $baseoffset, &$atomHierarchy, $ParseAllPossibleAtoms) {
                    // http://developer.apple.com/techpubs/quicktime/qtdevdocs/APIREF/INDEX/atomalphaindex.htm
            
                    $info = &$this->getid3->info;
            
            

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

                  public function Analyze() {
                      $info = &$this->getid3->info;
              
                      // initialize these values to an empty array, otherwise they default to NULL
                      // and you can't append array values to a NULL value
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio-video.riff.php - About 4 days to fix

                File Misc.php has 1774 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                <?php
                /**
                 * SimplePie
                 *
                 * A PHP-Based RSS and Atom Feed Framework.
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Misc.php - About 4 days to fix

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

                      function get_links($rel = 'alternate')
                      {
                          if (!isset($this->data['links']))
                          {
                              $this->data['links'] = array();
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 1 other location - About 4 days to fix
                  Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 2587..2659

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

                  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

                      function get_links($rel = 'alternate')
                      {
                          if (!isset($this->data['links']))
                          {
                              $this->data['links'] = array();
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 1 other location - About 4 days to fix
                  Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 6049..6121

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

                  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

                  Severity
                  Category
                  Status
                  Source
                  Language