CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

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

                        elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction']))
                        {
                            foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction'] as $restriction)
                            {
                                $restriction_relationship = null;
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 2 other locations - About 7 hrs to fix
Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 4945..5000
Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 5390..5419

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

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 3 locations. Consider refactoring.
Open

                        if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction']))
                        {
                            foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction'] as $restriction)
                            {
                                $restriction_relationship = null;
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 2 other locations - About 7 hrs to fix
Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 4945..5000
Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 4971..4996

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

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

    public function date_asctime($date)
    {
        static $pcre;
        if (!$pcre)
        {
Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 13402..13436

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

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 date_asctime($date)
    {
        static $pcre;
        if (!$pcre)
        {
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/Parse/Date.php on lines 928..962

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

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 3 locations. Consider refactoring.
Open

                        if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category']))
                        {
                            foreach ((array) $content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category'] as $category)
                            {
                                $term = null;
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 2 other locations - About 7 hrs to fix
Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 4627..4652
Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 5186..5211

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

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 3 locations. Consider refactoring.
Open

                        if (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category']))
                        {
                            foreach ((array) $group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category'] as $category)
                            {
                                $term = null;
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 2 other locations - About 7 hrs to fix
Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 4601..4626
Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 5186..5211

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

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 3 locations. Consider refactoring.
Open

                        if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category']))
                        {
                            foreach ((array) $content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category'] as $category)
                            {
                                $term = null;
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 2 other locations - About 7 hrs to fix
Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 4601..4626
Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 4627..4652

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

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

  function privExtractByRule(&$p_file_list, $p_path, $p_remove_path, $p_remove_all_path, &$p_options)
  {
    $v_result=1;

    // ----- Magic quotes trick
Severity: Major
Found in Web.Admin/2014/wordpress/wp-admin/includes/class-pclzip.php - About 7 hrs to fix

    Function force_balance_tags has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
    Open

    function force_balance_tags( $text ) {
        $tagstack = array(); $stacksize = 0; $tagqueue = ''; $newtext = '';
        $single_tags = array('br', 'hr', 'img', 'input'); //Known single-entity/self-closing tags
        $nestable_tags = array('blockquote', 'div', 'span'); //Tags that can be immediately nested within themselves
    
    
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-includes/formatting.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

    File class-wp-upgrader-skins.php has 496 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    /**
     * The User Interface "Skins" for the WordPress File Upgrader
     *
     * @package WordPress

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

          $('#show-settings-link').click(function () {
              if ( ! $('#screen-options-wrap').hasClass('screen-options-open') )
                  $('#contextual-help-link-wrap').css('visibility', 'hidden');
      
              $('#screen-options-wrap').slideToggle('fast', function(){
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-admin/js/common.dev.js and 1 other location - About 7 hrs to fix
      Web.Admin/2014/wordpress/wp-admin/js/common.dev.js on lines 198..213

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

      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

          $('#contextual-help-link').click(function () {
              if ( ! $('#contextual-help-wrap').hasClass('contextual-help-open') )
                  $('#screen-options-link-wrap').css('visibility', 'hidden');
      
              $('#contextual-help-wrap').slideToggle('fast', function() {
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-admin/js/common.dev.js and 1 other location - About 7 hrs to fix
      Web.Admin/2014/wordpress/wp-admin/js/common.dev.js on lines 180..195

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

      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 quicktags.dev.js has 494 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      // new edit toolbar used with permission
      // by Alex King
      // http://www.alexking.org/
      
      var edButtons = new Array(), edLinks = new Array(), edOpenTags = new Array(), now = new Date(), datetime;
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/js/quicktags.dev.js - About 7 hrs to fix

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

        dw_Rotator.prototype.prepAction = function() {
            if ( this.actions && this.parentLink && this.actions[this.ctr] ) {
                if ( typeof this.actions[this.ctr] == 'string' ) {
                    this.parentLink.href = this.actions[this.ctr];
                } else if ( typeof this.actions[this.ctr] == 'function' ) {
        Severity: Major
        Found in Web.Admin/2015/js/dw_rotator.js and 1 other location - About 7 hrs to fix
        Web.Admin/2014/js/dw_rotator.js on lines 109..122

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

        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

        {var nw=$obj.width(),nh=$obj.height();if((nw>w)&&w>0)
        {nw=w;nh=(w/$obj.width())*$obj.height();}
        if((nh>h)&&h>0)
        {nh=h;nw=(h/$obj.height())*$obj.width();}
        xscale=$obj.width()/nw;yscale=$obj.height()/nh;$obj.width(nw).height(nh);};function unscale(c)
        Web.Admin/2014/wordpress/wp-includes/js/jcrop/jquery.Jcrop.dev.js on lines 899..914

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

        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

            {
                var nw = $obj.width(), nh = $obj.height();
                if ((nw > w) && w > 0)
                {
                    nw = w;
        Web.Admin/2014/wordpress/wp-includes/js/jcrop/jquery.Jcrop.js on lines 124..128

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

        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

        dw_Rotator.prototype.prepAction = function() {
            if ( this.actions && this.parentLink && this.actions[this.ctr] ) {
                if ( typeof this.actions[this.ctr] == 'string' ) {
                    this.parentLink.href = this.actions[this.ctr];
                } else if ( typeof this.actions[this.ctr] == 'function' ) {
        Severity: Major
        Found in Web.Admin/2014/js/dw_rotator.js and 1 other location - About 7 hrs to fix
        Web.Admin/2015/js/dw_rotator.js on lines 109..122

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

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

            function display_rows() {
                global $post;
        
                add_filter( 'the_title','esc_html' );
                $alt = '';

          Method mw_newPost has 196 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function mw_newPost($args) {
                  $this->escape($args);
          
                  $blog_ID     = (int) $args[0]; // we will support this in the near future
                  $username  = $args[1];
          Severity: Major
          Found in Web.Admin/2014/wordpress/xmlrpc.php - About 7 hrs to fix

            Method mw_editPost has 196 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function mw_editPost($args) {
            
                    $this->escape($args);
            
                    $post_ID        = (int) $args[0];
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php - About 7 hrs to fix
              Severity
              Category
              Status
              Source
              Language