CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

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

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

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

    <?php
    /**
     * Simple and uniform HTTP request API.
     *
     * Standardizes the HTTP requests for WordPress. Handles cookies, gzip encoding and decoding, chunk
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/class-http.php - About 2 days to fix

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

      Ajax.Updater = Class.create(Ajax.Request, {
        initialize: function($super, container, url, options) {
          this.container = {
            success: (container.success || container),
            failure: (container.failure || (container.success ? null : container))
      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 1430..1468

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

      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.Updater = Class.create(Ajax.Request, {
        initialize: function($super, container, url, options) {
          this.container = {
            success: (container.success || container),
            failure: (container.failure || (container.success ? null : container))
      Web.Admin/2014/wordpress/wp-includes/js/prototype.js on lines 1430..1468

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

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

      <?php
      
      /**
       * Create HTML list of nav menu input items.
       *
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-admin/includes/nav-menu.php - About 2 days to fix

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

            public function feed_or_html()
            {
                $len = strlen($this->file->body);
                $pos = strspn($this->file->body, "\x09\x0A\x0D\x20");
        
        
        Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 13657..13731

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

        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 feed_or_html()
            {
                $len = strlen($this->file->body);
                $pos = strspn($this->file->body, "\x09\x0A\x0D\x20");
        
        
        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/SimplePie/Content/Type/Sniffer.php on lines 256..330

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

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

        <?php
        /**
         * Manages WordPress comments
         *
         * @package WordPress
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/comment.php - About 2 days to fix

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

          <?php
          /**
           * WordPress Post Administration API.
           *
           * @package WordPress
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-admin/includes/post.php - About 2 days to fix

            Function tb_show has a Cognitive Complexity of 110 (exceeds 5 allowed). Consider refactoring.
            Open

            function tb_show(caption, url, imageGroup) {//function called when the user clicks on a thickbox link
            
                try {
                    if (typeof document.body.style.maxHeight === "undefined") {//if IE 6
                        jQuery("body","html").css({height: "100%", width: "100%"});
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-includes/js/thickbox/thickbox.js - 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

            Function HandleAllTags has a Cognitive Complexity of 110 (exceeds 5 allowed). Consider refactoring.
            Open

                public function HandleAllTags() {
            
                    // key name => array (tag name, character encoding)
                    static $tags;
                    if (empty($tags)) {
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-includes/ID3/getid3.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

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

            var Template = Class.create({
              initialize: function(template, pattern) {
                this.template = template.toString();
                this.pattern = pattern || Template.Pattern;
              },
            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 551..582

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

            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 Template = Class.create({
              initialize: function(template, pattern) {
                this.template = template.toString();
                this.pattern = pattern || Template.Pattern;
              },
            Web.Admin/2014/wordpress/wp-includes/js/prototype.js on lines 551..582

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

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

            function $StateProvider(   $urlRouterProvider,   $urlMatcherFactory) {
            
              var root, states = {}, $state, queue = {}, abstractKey = 'abstract';
            
              // Builds state properties from definition passed to registerState()
            Severity: Major
            Found in Web.Admin/z-scripts/angular-ui-router.js - About 2 days to fix

              File class-wp-editor.php has 899 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              <?php
              /**
               * Facilitates adding of the WordPress editor as used on the Write and Edit screens.
               *
               * @package WordPress
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-includes/class-wp-editor.php - About 2 days to fix

                Method entity has 438 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function entity()
                    {
                        switch ($this->consume())
                        {
                            case "\x09":

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

                  class WP_Error {
                      /**
                       * Stores the list of errors.
                       *
                       * @since 2.1.0
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/wp-includes/class-wp-error.php and 1 other location - About 2 days to fix
                  Web.Admin/2014/wordpress/wp-includes/classes.php on lines 523..694

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

                  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

                  class WP_Error {
                      /**
                       * Stores the list of errors.
                       *
                       * @since 2.1.0
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/wp-includes/classes.php and 1 other location - About 2 days to fix
                  Web.Admin/2014/wordpress/wp-includes/class-wp-error.php on lines 21..192

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

                  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 nav-menu.js has 895 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  /**
                   * WordPress Administration Navigation Menu
                   * Interface JS functions
                   *
                   * @version 2.0.0
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/wp-admin/js/nav-menu.js - About 2 days to fix

                    Function featuredslider has 434 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        $.featuredslider = function( el, options ) {
                            var slider = $( el ),
                                msGesture = window.navigator && window.navigator.msPointerEnabled && window.MSGesture,
                                touch = ( ( 'ontouchstart' in window ) || msGesture || window.DocumentTouch && document instanceof DocumentTouch ), // MSFT specific.
                                eventType = 'click touchend MSPointerUp',
                    Severity: Major
                    Found in Web.Admin/2014/wordpress/wp-content/themes/twentyfourteen/js/slider.js - About 2 days to fix
                      Severity
                      Category
                      Status
                      Source
                      Language