CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

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

    function wp_getPostStatusList( $args ) {
        $this->escape( $args );

        $blog_id    = (int) $args[0];
        $username    = $args[1];
Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 3284..3301
Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 3372..3389
Web.Admin/2014/wordpress/xmlrpc.php on lines 1352..1369
Web.Admin/2014/wordpress/xmlrpc.php on lines 1414..1432
Web.Admin/2014/wordpress/xmlrpc.php on lines 1442..1460

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

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 6 locations. Consider refactoring.
Open

    function wp_getPostStatusList( $args ) {
        $this->escape( $args );

        $blog_id    = (int) $args[0];
        $username    = $args[1];
Severity: Major
Found in Web.Admin/2014/wordpress/xmlrpc.php and 5 other locations - About 2 hrs to fix
Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 3284..3301
Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 3345..3362
Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 3372..3389
Web.Admin/2014/wordpress/xmlrpc.php on lines 1352..1369
Web.Admin/2014/wordpress/xmlrpc.php on lines 1442..1460

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

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

    public function strip_htmltags($tags = array('base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style'))
    {
        if ($tags)
        {
            if (is_array($tags))
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Sanitize.php and 1 other location - About 2 hrs to fix
Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 14746..14763

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

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 6 locations. Consider refactoring.
Open

    function wp_getCommentStatusList($args) {
        $this->escape( $args );

        $blog_id    = (int) $args[0];
        $username    = $args[1];
Severity: Major
Found in Web.Admin/2014/wordpress/xmlrpc.php and 5 other locations - About 2 hrs to fix
Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 3284..3301
Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 3345..3362
Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 3372..3389
Web.Admin/2014/wordpress/xmlrpc.php on lines 1414..1432
Web.Admin/2014/wordpress/xmlrpc.php on lines 1442..1460

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

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 strip_htmltags($tags = array('base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style'))
    {
        if ($tags)
        {
            if (is_array($tags))
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 1 other location - About 2 hrs to fix
Web.Admin/2014/wordpress/wp-includes/SimplePie/Sanitize.php on lines 139..156

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

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 6 locations. Consider refactoring.
Open

    function wp_getPageStatusList( $args ) {
        $this->escape( $args );

        $blog_id    = (int) $args[0];
        $username    = $args[1];
Severity: Major
Found in Web.Admin/2014/wordpress/xmlrpc.php and 5 other locations - About 2 hrs to fix
Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 3284..3301
Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 3345..3362
Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 3372..3389
Web.Admin/2014/wordpress/xmlrpc.php on lines 1352..1369
Web.Admin/2014/wordpress/xmlrpc.php on lines 1414..1432

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

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 6 locations. Consider refactoring.
Open

    function wp_getCommentStatusList($args) {
        $this->escape( $args );

        $blog_id    = (int) $args[0];
        $username    = $args[1];
Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 3345..3362
Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 3372..3389
Web.Admin/2014/wordpress/xmlrpc.php on lines 1352..1369
Web.Admin/2014/wordpress/xmlrpc.php on lines 1414..1432
Web.Admin/2014/wordpress/xmlrpc.php on lines 1442..1460

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

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

        add: function( id, options ) {
            var workflow = this.get( id );

            // only add once: if exists return existing
            if ( workflow ) {
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/js/media-editor.js - About 2 hrs to fix

    Function showDialog has 62 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function showDialog() {
            var gridHtml, x, y, win;
    
            function getParentTd(elm) {
                while (elm) {

      Function getHtml has 62 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              getHtml: function() {
                  var data = this.shortcode.attrs.named,
                      model = wp.media.playlist,
                      options,
                      attachments,
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-includes/js/mce-view.js - About 2 hrs to fix

        Method _wp_get_comment_list has 62 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function _wp_get_comment_list( $status = '', $s = false, $start, $num, $post = 0, $type = '' ) {
            global $wpdb;
        
            $start = abs( (int) $start );
            $num = (int) $num;
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-admin/includes/template.php - About 2 hrs to fix

          Method step1 has 62 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function step1() {
                  global $verified;
                  set_time_limit( 0 );
                  update_option( 'ljapi_step', 1 );
                  if ( !$this->ixr ) $this->ixr = new IXR_Client( $this->ixr_url, false, 80, 30 );
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-admin/import/livejournal.php - About 2 hrs to fix

            Method _prepare_post has 62 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                protected function _prepare_post( $post, $fields ) {
                    // holds the data for this post. built up based on $fields
                    $_post = array( 'post_id' => strval( $post['ID'] ) );
            
                    // prepare common post fields
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php - About 2 hrs to fix

              Method getHashdata has 62 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function getHashdata($algorithm) {
                      switch ($algorithm) {
                          case 'md5':
                          case 'sha1':
                              break;
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-includes/ID3/getid3.php - About 2 hrs to fix

                Method FreeFormatFrameLength has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function FreeFormatFrameLength($offset, $deepscan=false) {
                        $info = &$this->getid3->info;
                
                        fseek($this->getid3->fp, $offset, SEEK_SET);
                        $MPEGaudioData = fread($this->getid3->fp, 32768);
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio.mp3.php - About 2 hrs to fix

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

                      getId : function(o) {
                          var id = o.tagName == 'TR' ? o.id : $(o).parents('tr').attr('id'), parts = id.split('-');
                          return parts[parts.length - 1];
                      }
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/wp-admin/js/inline-edit-tax.dev.js and 1 other location - About 2 hrs to fix
                  Web.Admin/2014/wordpress/wp-admin/js/inline-edit-post.dev.js on lines 253..256

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

                  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

                      getId : function(o) {
                          var id = o.tagName == 'TR' ? o.id : $(o).parents('tr').attr('id'), parts = id.split('-');
                          return parts[parts.length - 1];
                      }
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/wp-admin/js/inline-edit-post.dev.js and 1 other location - About 2 hrs to fix
                  Web.Admin/2014/wordpress/wp-admin/js/inline-edit-tax.dev.js on lines 112..115

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

                  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

                  {return function(e){if(options.disabled)return false;if((ord=='move')&&!options.allowMove)return false;btndown=true;startDragMode(ord,mouseAbs(e));e.stopPropagation();e.preventDefault();return false;};};function presize($obj,w,h)
                  Web.Admin/2014/wordpress/wp-includes/js/jcrop/jquery.Jcrop.dev.js on lines 886..896

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

                  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

                      flip : function (axis, postid, nonce, t) {
                          if ( $(t).hasClass('disabled') )
                              return false;
                  
                          this.addStep({ 'f': { 'f': axis, 'fw': this.hold['w'], 'fh': this.hold['h'] }}, postid, nonce);
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/wp-admin/js/image-edit.dev.js and 1 other location - About 2 hrs to fix
                  Web.Admin/2014/wordpress/wp-admin/js/image-edit.dev.js on lines 419..424

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

                  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

                      {
                          return function(e) {
                              if (options.disabled) return false;
                              if ((ord == 'move') && !options.allowMove) return false;
                              btndown = true;
                  Web.Admin/2014/wordpress/wp-includes/js/jcrop/jquery.Jcrop.js on lines 123..123

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

                  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