CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

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

function wp_comment_reply($position = '1', $checkbox = false, $mode = 'single', $table_row = true) {
    global $current_user;

    // allow plugin to replace the popup content
    $content = apply_filters( 'wp_comment_reply', '', array('position' => $position, 'checkbox' => $checkbox, 'mode' => $mode) );
Severity: Major
Found in Web.Admin/2014/wordpress/wp-admin/includes/template.php - About 2 hrs to fix

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

    function wp_restore_image($post_id) {
        $meta = wp_get_attachment_metadata($post_id);
        $file = get_attached_file($post_id);
        $backup_sizes = get_post_meta( $post_id, '_wp_attachment_backup_sizes', true );
        $restored = false;
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-admin/includes/image-edit.php - About 2 hrs to fix

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

      function image_edit_apply_changes($img, $changes) {
      
          if ( !is_array($changes) )
              return $img;
      
      
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-admin/includes/image-edit.php - About 2 hrs to fix

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

        function confirm_delete_users( $users ) {
            $current_user = wp_get_current_user();
            if ( !is_array( $users ) )
                return false;
            ?>
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-admin/network/users.php - About 2 hrs to fix

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

          function wp_delete_post( $postid = 0, $force_delete = false ) {
              global $wpdb, $wp_rewrite;
          
              if ( !$post = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->posts WHERE ID = %d", $postid)) )
                  return $post;
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-includes/post.php - About 2 hrs to fix

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

                public function tag_open($parser, $tag, $attributes)
                {
                    list($this->namespace[], $this->element[]) = $this->split_ns($tag);
            
                    $attribs = array();
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Parser.php - About 2 hrs to fix

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

                  function SimplePie_Cache_MySQL($mysql_location, $name, $extension)
                  {
                      $host = $mysql_location->get_host();
                      if (SimplePie_Misc::stripos($host, 'unix(') === 0 && substr($host, -1) === ')')
                      {
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 2 hrs to fix

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

                function _walk_bookmarks($bookmarks, $args = '' ) {
                    $defaults = array(
                        'show_updated' => 0, 'show_description' => 0,
                        'show_images' => 1, 'show_name' => 0,
                        'before' => '<li>', 'after' => '</li>', 'between' => "\n",
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-includes/bookmark-template.php - About 2 hrs to fix

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

                                  item.css( {backgroundColor:'#ceb'} ).animate( {backgroundColor: '#fff'}, { queue: false, duration: 500, complete: function(){ jQuery(this).css({backgroundColor:''}); } }).removeClass('undo');
                  Web.Admin/2014/wordpress/wp-includes/js/plupload/handlers.js on lines 189..189

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

                  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 lloc = pos;
                          KeyManager.watchKeys();
                  
                          return function(pos)
                  Web.Admin/2014/wordpress/wp-includes/js/jcrop/jquery.Jcrop.js on lines 119..120

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

                  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 $keymgr=$('<input type="radio" />').css({position:'absolute',left:'-30px'}).keypress(parseKey).blur(onBlur),$keywrap=$('<div />').css({position:'absolute',overflow:'hidden'}).append($keymgr);function watchKeys()
                  Web.Admin/2014/wordpress/wp-includes/js/jcrop/jquery.Jcrop.dev.js on lines 723..734

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

                  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

                                  item.css( {backgroundColor:'#ceb'} ).animate( {backgroundColor: '#fff'}, { queue: false, duration: 500, complete: function(){ jQuery(this).css({backgroundColor:''}); } }).removeClass('undo');
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/wp-includes/js/plupload/handlers.js and 1 other location - About 2 hrs to fix
                  Web.Admin/2014/wordpress/wp-includes/js/swfupload/handlers.dev.js on lines 126..126

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

                  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 $keymgr = $('<input type="radio" />')
                                  .css({ position: 'absolute', left: '-30px' })
                                  .keypress(parseKey)
                                  .blur(onBlur),
                  
                  
                  Web.Admin/2014/wordpress/wp-includes/js/jcrop/jquery.Jcrop.js on lines 100..100

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

                  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 lloc=pos;KeyManager.watchKeys();return function(pos)
                  {Coords.moveOffset([pos[0]-lloc[0],pos[1]-lloc[1]]);lloc=pos;Selection.update();};};function oppLockCorner(ord)
                  Web.Admin/2014/wordpress/wp-includes/js/jcrop/jquery.Jcrop.dev.js on lines 857..868

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

                  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

                      setHash : function(name, values_obj, expires, path, domain, secure) {
                          var str = '';
                  
                          this.each(values_obj, function(val, key) {
                              str += (!str ? '' : '&') + key + '=' + val;
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/wp-includes/js/utils.js and 1 other location - About 2 hrs to fix
                  Web.Admin/2014/wordpress/wp-admin/js/utils.dev.js on lines 66..74

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

                  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

                      setHash : function(n, v, e, p, d, s) {
                          var o = '';
                  
                          this.each(v, function(v, k) {
                              o += (!o ? '' : '&') + k + '=' + v;
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/wp-admin/js/utils.dev.js and 1 other location - About 2 hrs to fix
                  Web.Admin/2014/wordpress/wp-includes/js/utils.js on lines 55..63

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

                  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.addButton('add_video', {
                                  title : 'wordpress.add_video',
                                  image : url + '/img/video.gif',
                                  onclick : function() {
                                      tb_show('', tinymce.DOM.get('add_video').href);
                  Web.Admin/2014/wordpress/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.dev.js on lines 102..109

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

                  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.addButton('add_image', {
                                  title : 'wordpress.add_image',
                                  image : url + '/img/image.gif',
                                  onclick : function() {
                                      tb_show('', tinymce.DOM.get('add_image').href);
                  Web.Admin/2014/wordpress/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.dev.js on lines 111..118

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

                  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

                          case 'trash':
                              $trashed = 0;
                              foreach( (array) $post_ids as $post_id ) {
                                  if ( !current_user_can('delete_page', $post_id) )
                                      wp_die( __('You are not allowed to move this page to the trash.') );
                  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 43..55

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

                  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

                              $update_actions =  array(
                                  'preview' => '<a href="' . $preview_link . '" class="thickbox thickbox-preview" title="' . esc_attr(sprintf(__('Preview &#8220;%s&#8221;'), $name)) . '">' . __('Preview') . '</a>',
                                  'activate' => '<a href="' . $activate_link .  '" class="activatelink" title="' . esc_attr( sprintf( __('Activate &#8220;%s&#8221;'), $name ) ) . '">' . __('Activate') . '</a>',
                              );
                  Web.Admin/2014/wordpress/wp-admin/includes/class-wp-upgrader.php on lines 1045..1048

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

                  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