CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

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

        redo : function() {
            this.pos++;
            if(typeof(this.history[this.pos])=='undefined') this.pos--;
            editor.innerHTML = this.history[this.pos];
            CodePress.findString();
Web.Admin/2014/wordpress/wp-includes/js/codepress/engines/opera.js on lines 245..250

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

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

            ed.addCommand('JustifyLeft', function() {
                var n = ed.selection.getNode();

                if ( n.nodeName != 'IMG' )
                    ed.editorCommands.mceJustify('JustifyLeft', 'left');
Web.Admin/2014/wordpress/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.dev.js on lines 146..152

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

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

        redo : function() {
            this.pos++;
            if(typeof(this.history[this.pos])=='undefined') this.pos--;
            editor.innerHTML = this.history[this.pos];
            CodePress.findString();
Web.Admin/2014/wordpress/wp-includes/js/codepress/engines/msie.js on lines 289..294

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

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

            TelemetryContext.prototype._applyLocationContext = function (envelope, locationContext) {
                if (locationContext) {
                    var tagKeys = new AI.ContextTagKeys();
                    if (typeof locationContext.ip === "string") {
                        envelope.tags[tagKeys.locationIp] = locationContext.ip;
Severity: Major
Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 1 other location - About 2 hrs to fix
Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 1924..1931

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

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 chgrp($file, $group, $recursive = false ) {
        if ( ! $this->exists($file) )
            return false;
        if ( ! $recursive || ! $this->is_dir($file) )
            return $this->run_command(sprintf('chgrp %o %s', $mode, escapeshellarg($file)), true);
Web.Admin/2014/wordpress/wp-admin/includes/class-wp-filesystem-ssh2.php on lines 205..211

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

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

<?php if ( isset($_GET['posted']) && $_GET['posted'] ) : $_GET['posted'] = (int) $_GET['posted']; ?>
<div id="message" class="updated fade"><p><strong><?php _e('Your page has been saved.'); ?></strong> <a href="<?php echo get_permalink( $_GET['posted'] ); ?>"><?php _e('View page'); ?></a> | <a href="<?php echo get_edit_post_link( $_GET['posted'] ); ?>"><?php _e('Edit page'); ?></a></p></div>
<?php $_SERVER['REQUEST_URI'] = remove_query_arg(array('posted'), $_SERVER['REQUEST_URI']);
endif; ?>
Severity: Major
Found in Web.Admin/2014/wordpress/wp-admin/edit-pages.php and 1 other location - About 2 hrs to fix
Web.Admin/2014/wordpress/wp-admin/edit.php on lines 143..146

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

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 chown($file, $owner, $recursive = false ) {
        if ( ! $this->exists($file) )
            return false;
        if ( ! $recursive || ! $this->is_dir($file) )
            return $this->run_command(sprintf('chown %o %s', $mode, escapeshellarg($file)), true);
Web.Admin/2014/wordpress/wp-admin/includes/class-wp-filesystem-ssh2.php on lines 179..185

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

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 ( ( abs($t_diff = time() - $time) ) < 86400 ) {
                if ( $t_diff < 0 )
                    $h_time = sprintf( __('%s from now'), human_time_diff( $time ) );
                else
                    $h_time = sprintf( __('%s ago'), human_time_diff( $time ) );
Severity: Major
Found in Web.Admin/2014/wordpress/wp-admin/edit-attachment-rows.php and 1 other location - About 2 hrs to fix
Web.Admin/2014/wordpress/wp-admin/upload.php on lines 420..427

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

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

if ( isset($_GET['posted']) && $_GET['posted'] ) : $_GET['posted'] = (int) $_GET['posted']; ?>
<div id="message" class="updated fade"><p><strong><?php _e('Your post has been saved.'); ?></strong> <a href="<?php echo get_permalink( $_GET['posted'] ); ?>"><?php _e('View post'); ?></a> | <a href="<?php echo get_edit_post_link( $_GET['posted'] ); ?>"><?php _e('Edit post'); ?></a></p></div>
<?php $_SERVER['REQUEST_URI'] = remove_query_arg(array('posted'), $_SERVER['REQUEST_URI']);
endif; ?>
Severity: Major
Found in Web.Admin/2014/wordpress/wp-admin/edit.php and 1 other location - About 2 hrs to fix
Web.Admin/2014/wordpress/wp-admin/edit-pages.php on lines 182..185

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

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 ( ( abs($t_diff = time() - $time) ) < 86400 ) {
                if ( $t_diff < 0 )
                    $h_time = sprintf( __('%s from now'), human_time_diff( $time ) );
                else
                    $h_time = sprintf( __('%s ago'), human_time_diff( $time ) );
Severity: Major
Found in Web.Admin/2014/wordpress/wp-admin/upload.php and 1 other location - About 2 hrs to fix
Web.Admin/2014/wordpress/wp-admin/edit-attachment-rows.php on lines 155..162

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

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

angular.mock.$Browser = function() {
  var self = this;

  this.isMock = true;
  self.$$url = "http://server/";
Severity: Major
Found in Web.Admin/z-scripts/angular-mocks.js - About 2 hrs to fix

    Function User has 59 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                var User = (function () {
                    function User(accountId) {
                        var cookie = ApplicationInsights.Util.getCookie(User.userCookieName);
                        if (cookie) {
                            var params = cookie.split(User.cookieSeparator);
    Severity: Major
    Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 2 hrs to fix

      Function open has 59 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          open : function(id, p, a) {
              var t = this, editRow, rowData, act, h, c = $('#comment-' + id);
              t.close();
              t.cid = id;
      
      
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-admin/js/edit-comments.dev.js - About 2 hrs to fix

        Function run has 59 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                run: function( deferred ) {
                    var self   = this,
                        loaded = false,
                        ready  = false;
        
        
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-admin/js/customize-controls.js - About 2 hrs to fix

          Function prepareMediaItemInit has 59 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function prepareMediaItemInit(fileObj) {
              var item = jQuery('#media-item-' + fileObj.id);
              // Clone the thumbnail as a "pinkynail" -- a tiny image to the left of the filename
              jQuery('.thumbnail', item).clone().attr('className', 'pinkynail toggle').prependTo(item);
          
          
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-includes/js/swfupload/handlers.dev.js - About 2 hrs to fix

            Method privAddFileUsingTempFile has 59 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function privAddFileUsingTempFile($p_filedescr, &$p_header, &$p_options)
              {
                $v_result=PCLZIP_ERR_NO_ERROR;
            
                // ----- Working variable
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-admin/includes/class-pclzip.php - About 2 hrs to fix

              Method edit_post has 59 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function edit_post( $post_data = null ) {
              
                  if ( empty($post_data) )
                      $post_data = &$_POST;
              
              
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-admin/includes/post.php - About 2 hrs to fix

                Method media_upload_form_handler has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function media_upload_form_handler() {
                    check_admin_referer('media-form');
                
                    $errors = null;
                
                
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-admin/includes/media.php - About 2 hrs to fix

                  Method parselisting has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function parselisting($line) {
                          static $is_windows;
                          if ( is_null($is_windows) )
                              $is_windows = strpos( strtolower(ftp_systype($this->link)), 'win') !== false;
                  
                  

                    Method prepare_items has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function prepare_items() {
                            global $post_id, $comment_status, $search, $comment_type;
                    
                            $comment_status = isset( $_REQUEST['comment_status'] ) ? $_REQUEST['comment_status'] : 'all';
                            if ( !in_array( $comment_status, array( 'all', 'moderated', 'approved', 'spam', 'trash' ) ) )
                      Severity
                      Category
                      Status
                      Source
                      Language