CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

Function updateHtml has 125 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function updateHtml(html, data, updateAll) {
        var writer = new tinymce.html.Writer();
        var sourceCount = 0, hasImage;

        function setAttributes(attrs, updatedAttrs) {

    Function update has 125 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        update : function() {
            var t = this, f = document.forms[0], ed = tinyMCEPopup.editor, el, b, fixSafari = null, DL, P, A, DIV, do_caption = null, img_class = f.img_classes.value, html;
    
            tinyMCEPopup.restoreSelection();
            el = ed.selection.getNode();

      Method get has 125 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public static function get( $hook_name = '' ) {
      
              if ( is_a( $hook_name, 'WP_Screen' ) )
                  return $hook_name;
      
      
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-admin/includes/screen.php - About 5 hrs to fix

        Method wp_mail has 125 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() ) {
            // Compact the input, apply the filters, and extract them back out
            extract( apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', 'headers', 'attachments' ) ) );
        
            if ( !is_array($attachments) )
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/pluggable.php - About 5 hrs to fix

          Method editor_js has 125 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public static function editor_js() {
                  global $tinymce_version, $concatenate_scripts, $compress_scripts;
          
                  /**
                   * Filter "tiny_mce_version" is deprecated
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-includes/class-wp-editor.php - About 5 hrs to fix

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

                media.controller.VideoDetails = media.controller.State.extend({
                    defaults: {
                        id: 'video-details',
                        toolbar: 'video-details',
                        title: l10n.videoDetailsTitle,
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-includes/js/media-audiovideo.js and 1 other location - About 5 hrs to fix
            Web.Admin/2014/wordpress/wp-includes/js/media-audiovideo.js on lines 350..365

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

            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

                media.controller.AudioDetails = media.controller.State.extend({
                    defaults: {
                        id: 'audio-details',
                        toolbar: 'audio-details',
                        title: l10n.audioDetailsTitle,
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-includes/js/media-audiovideo.js and 1 other location - About 5 hrs to fix
            Web.Admin/2014/wordpress/wp-includes/js/media-audiovideo.js on lines 374..389

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

            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

                    shortcode : function( model ) {
                        var self = this, content;
            
                        _.each( this.defaults, function( value, key ) {
                            model[ key ] = self.coerce( model, key );
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-includes/js/media-audiovideo.js and 1 other location - About 5 hrs to fix
            Web.Admin/2014/wordpress/wp-includes/js/media-audiovideo.js on lines 282..301

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

            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

                    shortcode : function( model ) {
                        var self = this, content;
            
                        _.each( this.defaults, function( value, key ) {
                            model[ key ] = self.coerce( model, key );
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-includes/js/media-audiovideo.js and 1 other location - About 5 hrs to fix
            Web.Admin/2014/wordpress/wp-includes/js/media-audiovideo.js on lines 221..240

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

            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 wp_getCommentCount( $args ) {
                    $this->escape($args);
            
                    $blog_id    = (int) $args[0];
                    $username    = $args[1];
            Web.Admin/2014/wordpress/xmlrpc.php on lines 1379..1404

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

            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 wp_getCommentCount( $args ) {
                    $this->escape($args);
            
                    $blog_id    = (int) $args[0];
                    $username    = $args[1];
            Severity: Major
            Found in Web.Admin/2014/wordpress/xmlrpc.php and 1 other location - About 5 hrs to fix
            Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 3311..3335

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

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

            /* global plupload, pluploadL10n, ajaxurl, post_id, wpUploaderInit, deleteUserSetting, setUserSetting, getUserSetting, shortform */
            var topWin = window.dialogArguments || opener || parent || top, uploader, uploader_init;
            
            // progress and success handlers for media multi uploads
            function fileQueued(fileObj) {
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-includes/js/plupload/handlers.js - About 5 hrs to fix

              Function $Resolve has 124 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function $Resolve(  $q,    $injector) {
                
                var VISIT_IN_PROGRESS = 1,
                    VISIT_DONE = 2,
                    NOTHING = {},
              Severity: Major
              Found in Web.Admin/z-scripts/angular-ui-router.js - About 4 hrs to fix

                Function touch has 124 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                            touch: function() {
                                var startX,
                                    startY,
                                    offset,
                                    cwidth,

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

                  dw_Rotator.prototype.swapAlt = function(imgObj) {
                      if ( !imgObj.setAttribute ) return;
                      if ( this.alt && this.alt[this.ctr] ) {
                          imgObj.setAttribute('alt', this.alt[this.ctr]);
                      }
                  Severity: Major
                  Found in Web.Admin/2014/js/dw_rotator.js and 1 other location - About 4 hrs to fix
                  Web.Admin/2015/js/dw_rotator.js on lines 99..107

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

                  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.swapAlt = function(imgObj) {
                      if ( !imgObj.setAttribute ) return;
                      if ( this.alt && this.alt[this.ctr] ) {
                          imgObj.setAttribute('alt', this.alt[this.ctr]);
                      }
                  Severity: Major
                  Found in Web.Admin/2015/js/dw_rotator.js and 1 other location - About 4 hrs to fix
                  Web.Admin/2014/js/dw_rotator.js on lines 99..107

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

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

                  /**
                   * Heartbeat API
                   *
                   * Heartbeat is a simple server polling API that sends XHR requests to
                   * the server every 15 - 60 seconds and triggers events (or callbacks) upon
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-includes/js/heartbeat.js - About 4 hrs to fix

                    Function updateWidget has 123 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            updateWidget: function( args ) {
                                var self = this, instanceOverride, completeCallback, $widgetRoot, $widgetContent,
                                    updateNumber, params, data, $inputs, processing, jqxhr, isChanged;
                    
                                args = $.extend( {
                    Severity: Major
                    Found in Web.Admin/2014/wordpress/wp-admin/js/customize-widgets.js - About 4 hrs to fix

                      Method parse_request has 123 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function parse_request($extra_query_vars = '') {
                              global $wp_rewrite;
                      
                              /**
                               * Filter whether to parse the request.
                      Severity: Major
                      Found in Web.Admin/2014/wordpress/wp-includes/class-wp.php - About 4 hrs to fix

                        Function addMethods has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
                        Open

                        Element.addMethods = function(methods) {
                          var F = Prototype.BrowserFeatures, T = Element.Methods.ByTag;
                        
                          if (!methods) {
                            Object.extend(Form, Form.Methods);
                        Severity: Minor
                        Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js - About 4 hrs to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Severity
                        Category
                        Status
                        Source
                        Language