CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

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

        if ( null == $accessible_hosts ) {
            $accessible_hosts = preg_split('|,\s*|', WP_ACCESSIBLE_HOSTS);

            if ( false !== strpos(WP_ACCESSIBLE_HOSTS, '*') ) {
                $wildcard_regex = array();
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/class-http.php and 1 other location - About 2 hrs to fix
Web.Admin/2014/wordpress/wp-includes/class-http.php on lines 1691..1700

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

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

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

        if ( null == $bypass_hosts ) {
            $bypass_hosts = preg_split('|,\s*|', WP_PROXY_BYPASS_HOSTS);

            if ( false !== strpos(WP_PROXY_BYPASS_HOSTS, '*') ) {
                $wildcard_regex = array();
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/class-http.php and 1 other location - About 2 hrs to fix
Web.Admin/2014/wordpress/wp-includes/class-http.php on lines 623..632

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

        $install_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 1102..1105

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

File handlers.dev.js has 264 lines of code (exceeds 250 allowed). Consider refactoring.
Open


function fileDialogStart() {
    jQuery("#media-upload-error").empty();
}

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/js/swfupload/handlers.dev.js - About 2 hrs to fix

    File greymatter.php has 264 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    /**
     * GreyMatter Importer
     *
     * @package WordPress
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-admin/import/greymatter.php - About 2 hrs to fix

      Enumerable has 22 functions (exceeds 20 allowed). Consider refactoring.
      Open

      var Enumerable = {
        each: function(iterator, context) {
          var index = 0;
          iterator = iterator.bind(context);
          try {
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js - About 2 hrs to fix

        wpImage has 22 functions (exceeds 20 allowed). Consider refactoring.
        Open

        var wpImage = {
            preInit : function() {
                // import colors stylesheet from parent
                var win = tinyMCEPopup.getWin();
                var styles = win.document.styleSheets;

          Enumerable has 22 functions (exceeds 20 allowed). Consider refactoring.
          Open

          var Enumerable = {
            each: function(iterator, context) {
              var index = 0;
              iterator = iterator.bind(context);
              try {
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js - About 2 hrs to fix

            Slider has 22 functions (exceeds 20 allowed). Consider refactoring.
            Open

            Control.Slider = Class.create({
              initialize: function(handle, track, options) {
                var slider = this;
                
                if (Object.isArray(handle)) {
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/slider.js - About 2 hrs to fix

              Consider simplifying this complex logical expression.
              Open

                      if (
                          isset( $parent_item->type ) &&
                          (
                              // ancestral post object
                              (
              Severity: Critical
              Found in Web.Admin/2014/wordpress/wp-includes/nav-menu-template.php - About 2 hrs to fix

                SimplePie_Source has 22 functions (exceeds 20 allowed). Consider refactoring.
                Open

                class SimplePie_Source
                {
                    var $item;
                    var $data = array();
                
                
                Severity: Minor
                Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 2 hrs to fix

                  Class ContingentViewQueries has 22 methods (exceeds 20 allowed). Consider refactoring.
                  Open

                      public class ContingentViewQueries :
                          IReadModel,
                          IContingentViewQueries,
                          ISubscribeTo<ContingentCreated>,
                          ISubscribeTo<ContingentAssignedToTournament>,
                  Severity: Minor
                  Found in ReadModels/ContingentViewQueries.cs - About 2 hrs to fix

                    Function loadCSS has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                loadCSS : function( href, id, callback ) {
                    
                                    var link,
                                        length;
                    
                    
                    Severity: Major
                    Found in Web.Admin/2015/js/galleria/galleria-1.4.2.js - About 2 hrs to fix

                      Function _serializeObject has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                  Serializer._serializeObject = function (source, name) {
                                      var circularReferenceCheck = "__aiCircularRefCheck";
                                      var output = {};
                                      if (!source) {
                                          ApplicationInsights._InternalLogging.throwInternalUserActionable(0 /* CRITICAL */, "cannot serialize " + name + " because it is null or undefined");
                      Severity: Major
                      Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 2 hrs to fix

                        Function refreshAdvancedAccessibility has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                refreshAdvancedAccessibility : function() {
                        
                                    // Hide all links by default
                                    $( '.menu-item-settings .field-move a' ).css( 'display', 'none' );
                        
                        
                        Severity: Major
                        Found in Web.Admin/2014/wordpress/wp-admin/js/nav-menu.js - About 2 hrs to fix

                          Function hoverIntent has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              $.fn.hoverIntent = function(f,g) {
                                  // default configuration options
                                  var cfg = {
                                      sensitivity: 7,
                                      interval: 100,
                          Severity: Major
                          Found in Web.Admin/2014/wordpress/wp-includes/js/hoverIntent.dev.js - About 2 hrs to fix

                            Function loadCSS has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                        loadCSS : function( href, id, callback ) {
                            
                                            var link,
                                                length;
                            
                            Severity: Major
                            Found in Web.Admin/Content/galleria/galleria-1.4.2.js - About 2 hrs to fix

                              Method wp_handle_upload has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function wp_handle_upload( &$file, $overrides = false, $time = null ) {
                                  // The default error handler.
                                  if (! function_exists( 'wp_handle_upload_error' ) ) {
                                      function wp_handle_upload_error( &$file, $message ) {
                                          return array( 'error'=>$message );
                              Severity: Major
                              Found in Web.Admin/2014/wordpress/wp-admin/includes/file.php - About 2 hrs to fix

                                Method _tag_row has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function _tag_row( $tag, $class = '', $taxonomy = 'post_tag' ) {
                                        $count = number_format_i18n( $tag->count );
                                        $tagsel = ($taxonomy == 'post_tag' ? 'tag' : $taxonomy);
                                        $count = ( $count > 0 ) ? "<a href='edit.php?$tagsel=$tag->slug'>$count</a>" : $count;
                                
                                
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-admin/includes/template.php - About 2 hrs to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language