CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

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

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

    Function single_row has a Cognitive Complexity of 125 (exceeds 5 allowed). Consider refactoring.
    Open

        function single_row( $post, $level = 0 ) {
            global $mode;
            static $alternate;
    
            $global_post = get_post();

    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

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

    if (!document.createRange || Prototype.Browser.Opera) {
      Element.Methods.insert = function(element, insertions) {
        element = $(element);
    
        if (Object.isString(insertions) || Object.isNumber(insertions) ||
    Web.Admin/2014/wordpress/wp-includes/js/prototype.js on lines 2175..2212

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

    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 (!document.createRange || Prototype.Browser.Opera) {
      Element.Methods.insert = function(element, insertions) {
        element = $(element);
    
        if (Object.isString(insertions) || Object.isNumber(insertions) ||
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js and 1 other location - About 2 days to fix
    Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js on lines 2175..2212

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

    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

    Ajax.PeriodicalUpdater = Class.create(Ajax.Base, {
      initialize: function($super, container, url, options) {
        $super(options);
        this.onComplete = this.options.onComplete;
    
    
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js and 1 other location - About 2 days to fix
    Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js on lines 1470..1509

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

    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

    Ajax.PeriodicalUpdater = Class.create(Ajax.Base, {
      initialize: function($super, container, url, options) {
        $super(options);
        this.onComplete = this.options.onComplete;
    
    
    Web.Admin/2014/wordpress/wp-includes/js/prototype.js on lines 1470..1509

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

    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() {        
                    
        var folioGalleryDir = './'; // foliogallery folder relative path - absolute path like http://my_website.com/foliogallery may not work
            
        // find divs with class folioGallery and load album in it based on its id
    Severity: Major
    Found in Web.Admin/2015/foliogallery/foliogallery.js and 1 other location - About 2 days to fix
    Web.Admin/2014/foliogallery/foliogallery.js on lines 6..53

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

    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() {        
                    
        var folioGalleryDir = './'; // foliogallery folder relative path - absolute path like http://my_website.com/foliogallery may not work
            
        // find divs with class folioGallery and load album in it based on its id
    Severity: Major
    Found in Web.Admin/2014/foliogallery/foliogallery.js and 1 other location - About 2 days to fix
    Web.Admin/2015/foliogallery/foliogallery.js on lines 6..53

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

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

    $.imgAreaSelect = function (img, options) {
        var
    
            $img = $(img),
    
    

      Function get_terms has a Cognitive Complexity of 119 (exceeds 5 allowed). Consider refactoring.
      Open

      function &get_terms($taxonomies, $args = '') {
          global $wpdb;
          $empty_array = array();
      
          $single_taxonomy = false;
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/taxonomy.php - About 2 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

      File http.php has 963 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      /**
       * Simple and uniform HTTP request API.
       *
       * Will eventually replace and standardize the WordPress HTTP requests made.
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-includes/http.php - About 2 days to fix

        File akismet.php has 941 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        /*
        Plugin Name: Akismet
        Plugin URI: http://akismet.com/
        Description: Akismet checks your comments against the Akismet web service to see if they look like spam or not. You need a <a href="http://akismet.com/get/">WordPress.com API key</a> to use it. You can review the spam it catches under "Comments." To show off your Akismet stats just put <code>&lt;?php akismet_counter(); ?&gt;</code> in your template. See also: <a href="http://wordpress.org/extend/plugins/stats/">WP Stats plugin</a>.
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-content/plugins/akismet/akismet.php - About 2 days to fix

          Function get_themes has a Cognitive Complexity of 115 (exceeds 5 allowed). Consider refactoring.
          Open

          function get_themes() {
              global $wp_themes, $wp_broken_themes;
          
              if ( isset($wp_themes) )
                  return $wp_themes;
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-includes/theme.php - About 2 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

          File angular-mocks.js has 940 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /**
           * @license AngularJS v1.4.3
           * (c) 2010-2015 Google, Inc. http://angularjs.org
           * License: MIT
           */
          Severity: Major
          Found in Web.Admin/z-scripts/angular-mocks.js - About 2 days to fix

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

                        foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'link') as $link)
                        {
                            if (isset($link['attribs']['']['href']) && !empty($link['attribs']['']['rel']) && $link['attribs']['']['rel'] === 'enclosure')
                            {
                                // Attributes
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php and 1 other location - About 2 days to fix
            Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php on lines 2798..2831

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

            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

                        foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'link') as $link)
                        {
                            if (isset($link['attribs']['']['href']) && !empty($link['attribs']['']['rel']) && $link['attribs']['']['rel'] === 'enclosure')
                            {
                                // Attributes
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php and 1 other location - About 2 days to fix
            Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php on lines 2763..2796

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

            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 pluggable.php has 933 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            /**
             * These functions can be replaced via plugins. If plugins do not redefine these
             * functions, then these will be used instead.
             *
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-includes/pluggable.php - About 2 days to fix

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

              <?php
              /**
               * WordPress Link Template Functions
               *
               * @package WordPress
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-includes/link-template.php - About 2 days to fix

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

                            foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'link') as $link)
                            {
                                if (isset($link['attribs']['']['href']) && !empty($link['attribs']['']['rel']) && $link['attribs']['']['rel'] === 'enclosure')
                                {
                                    // Attributes
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 1 other location - About 2 days to fix
                Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 5453..5486

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

                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

                            foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'link') as $link)
                            {
                                if (isset($link['attribs']['']['href']) && !empty($link['attribs']['']['rel']) && $link['attribs']['']['rel'] === 'enclosure')
                                {
                                    // Attributes
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 1 other location - About 2 days to fix
                Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 5488..5521

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

                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