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 ( isset($_GET['trashed']) && (int) $_GET['trashed'] ) {
    printf( _n( 'Post moved to the trash.', '%s posts moved to the trash.', $_GET['trashed'] ), number_format_i18n( $_GET['trashed'] ) );
    $ids = isset($_GET['ids']) ? $_GET['ids'] : 0;
    echo ' <a href="' . esc_url( wp_nonce_url( "edit.php?doaction=undo&action=untrash&ids=$ids", "bulk-posts" ) ) . '">' . __('Undo') . '</a><br />';
    unset($_GET['trashed']);
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 167..172

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

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

function UrlMatcher(pattern, config, parentMatcher) {
  config = extend({ params: {} }, isObject(config) ? config : {});

  // Find all placeholders and create a compiled pattern, using either classic or curly syntax:
  //   '*' name
Severity: Major
Found in Web.Admin/z-scripts/angular-ui-router.js - About 2 hrs to fix

    Function tabHandler has 70 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function tabHandler(e) {
            var x, el, v, i;
    
            if (e.keyCode !== 9 || e.ctrlKey || e.altKey || e.metaKey) {
                return;

      Method type_url_form_image has 70 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function type_url_form_image() {
      
          if ( !apply_filters( 'disable_captions', '' ) ) {
              $caption = '
              <tr>
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-admin/includes/media.php - About 2 hrs to fix

        Method _wp_ajax_add_hierarchical_term has 70 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function _wp_ajax_add_hierarchical_term() {
            $action = $_POST['action'];
            $taxonomy = get_taxonomy(substr($action, 4));
            check_ajax_referer( $action, '_ajax_nonce-add-' . $taxonomy->name );
            if ( !current_user_can( $taxonomy->cap->edit_terms ) )
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-admin/includes/ajax-actions.php - About 2 hrs to fix

          Method wp_get_object_terms has 70 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function wp_get_object_terms($object_ids, $taxonomies, $args = array()) {
              global $wpdb;
          
              if ( !is_array($taxonomies) )
                  $taxonomies = array($taxonomies);
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-includes/taxonomy.php - About 2 hrs to fix

            Method request has 70 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function request( $url, $args = array() ) {
                    global $wp_version;
            
                    $defaults = array(
                        'method' => 'GET',
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-includes/http.php - About 2 hrs to fix

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

                  wp.mce.audio = _.extend( {}, wp.mce.media, {
                      shortcode: 'audio',
                      state: 'audio-details',
                      View: wp.mce.media.View.extend({
                          className: 'editor-audio',
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-includes/js/mce-view.js and 1 other location - About 2 hrs to fix
              Web.Admin/2014/wordpress/wp-includes/js/mce-view.js on lines 513..520

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

              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

                  wp.mce.video = _.extend( {}, wp.mce.media, {
                      shortcode: 'video',
                      state: 'video-details',
                      View: wp.mce.media.View.extend({
                          className: 'editor-video',
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-includes/js/mce-view.js and 1 other location - About 2 hrs to fix
              Web.Admin/2014/wordpress/wp-includes/js/mce-view.js on lines 528..535

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

              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 class-wp-ms-sites-list-table.php has 283 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              <?php
              /**
               * Sites List Table class.
               *
               * @package WordPress

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

                                            if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description']))
                                            {
                                                $description = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
                                            }
                                            elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description']))
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php and 3 other locations - About 2 hrs to fix
                Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php on lines 2338..2349
                Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 4767..4778
                Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 5031..5042

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

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

                                            if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title']))
                                            {
                                                $title = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
                                            }
                                            elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title']))
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php and 3 other locations - About 2 hrs to fix
                Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php on lines 2074..2085
                Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 4767..4778
                Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 5031..5042

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

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

                                        if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title']))
                                        {
                                            $title = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
                                        }
                                        elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title']))
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 3 other locations - About 2 hrs to fix
                Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php on lines 2074..2085
                Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php on lines 2338..2349
                Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 4767..4778

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

                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

                        elseif ($handler === 'fmedia' || ($handler === 'mp3' && $mediaplayer !== ''))
                        {
                            $height += 20;
                            if ($native)
                            {
                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/Enclosure.php on lines 1139..1150

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

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

                                        if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description']))
                                        {
                                            $description = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
                                        }
                                        elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description']))
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 3 other locations - About 2 hrs to fix
                Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php on lines 2074..2085
                Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php on lines 2338..2349
                Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 5031..5042

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

                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 ( $categories ) {
                        foreach ( $categories as $category ) {
                            if ( $currentcat != $category->term_id && $parent == $category->parent) {
                                $pad = str_repeat( '&#8211; ', $level );
                                $category->name = esc_html( $category->name );
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-admin/includes/deprecated.php and 1 other location - About 2 hrs to fix
                Web.Admin/2014/wordpress/wp-admin/includes/template.php on lines 2408..2422

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

                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

                        elseif ($handler === 'fmedia' || ($handler === 'mp3' && $mediaplayer !== ''))
                        {
                            $height += 20;
                            if ($native)
                            {
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Enclosure.php and 1 other location - About 2 hrs to fix
                Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 7108..7119

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

                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 ( $categories ) {
                        foreach ( $categories as $category ) {
                            if ( $currentcat != $category->term_id && $parent == $category->parent) {
                                $pad = str_repeat( '&#8211; ', $level );
                                $category->name = esc_html( $category->name );
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-admin/includes/template.php and 1 other location - About 2 hrs to fix
                Web.Admin/2014/wordpress/wp-admin/includes/deprecated.php on lines 145..159

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

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

                            var PageViewPerformance = (function (_super) {
                                __extends(PageViewPerformance, _super);
                                function PageViewPerformance(name, url, durationMs, properties, measurements) {
                                    _super.call(this);
                                    this.aiDataContract = {
                Severity: Major
                Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 2 hrs to fix

                  Function preview has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      preview: function( event ) {
                          var self = this,
                              current, preview;
                  
                          // Bail if the user scrolled on a touch device
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/wp-admin/js/theme.js - About 2 hrs to fix
                    Severity
                    Category
                    Status
                    Source
                    Language