CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

Method wp_ajax_inline_save has 50 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function wp_ajax_inline_save() {
    global $wp_list_table;

    check_ajax_referer( 'inlineeditnonce', '_inline_edit' );

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/ajax-actions.php - About 2 hrs to fix

    Method meta_form has 50 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function meta_form() {
        global $wpdb;
        $limit = (int) apply_filters( 'postmeta_form_limit', 30 );
        $keys = $wpdb->get_col( "
            SELECT meta_key
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-admin/includes/template.php - About 2 hrs to fix

      Method wp_ajax_save_widget has 50 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function wp_ajax_save_widget() {
          global $wp_registered_widgets, $wp_registered_widget_controls, $wp_registered_widget_updates;
      
          check_ajax_referer( 'save-sidebar-widgets', 'savewidgets' );
      
      
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-admin/includes/ajax-actions.php - About 2 hrs to fix

        Method _display_rows_hierarchical has 50 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function _display_rows_hierarchical( $pages, $pagenum = 1, $per_page = 20 ) {
                global $wpdb;
        
                $level = 0;
        
        

          Method get_feed has 50 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function get_feed($page = 1, $post_type = 'post') {
                  global $post, $wp, $wp_query, $posts, $wpdb, $blog_id;
                  log_app('function',"get_feed($page, '$post_type')");
                  ob_start();
          
          
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-app.php - About 2 hrs to fix

            Method take_action has 50 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function take_action() {
            
                    if ( empty($_POST) )
                        return;
            
            
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-admin/custom-background.php - About 2 hrs to fix

              Method wp_getPosts has 50 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function wp_getPosts( $args ) {
                      if ( ! $this->minimum_args( $args, 3 ) )
                          return $this->error;
              
                      $this->escape( $args );
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php - About 2 hrs to fix

                Method get_theme_data has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function get_theme_data( $theme_file ) {
                    $default_headers = array( 
                        'Name' => 'Theme Name', 
                        'URI' => 'Theme URI', 
                        'Description' => 'Description', 
                Severity: Minor
                Found in Web.Admin/2014/wordpress/wp-includes/theme.php - About 2 hrs to fix

                  Method wp_set_object_terms has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function wp_set_object_terms($object_id, $terms, $taxonomy, $append = false) {
                      global $wpdb;
                  
                      $object_id = (int) $object_id;
                  
                  
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-includes/taxonomy.php - About 2 hrs to fix

                    Consider simplifying this complex logical expression.
                    Open

                            if ( 'post' == $current_screen->base
                                && 'add' != $current_screen->action
                                && ( $post_type_object = get_post_type_object( $post->post_type ) )
                                && current_user_can( 'read_post', $post->ID )
                                && ( $post_type_object->public )
                    Severity: Critical
                    Found in Web.Admin/2014/wordpress/wp-includes/admin-bar.php - About 2 hrs to fix

                      Method import_from_reader has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function import_from_reader($reader) {
                              $endian_string = MO::get_byteorder($reader->readint32());
                              if (false === $endian_string) {
                                  return false;
                              }
                      Severity: Minor
                      Found in Web.Admin/2014/wordpress/wp-includes/pomo/mo.php - About 2 hrs to fix

                        Consider simplifying this complex logical expression.
                        Open

                                if ($integer >= 0x41 && $integer <= 0x5A || $integer >= 0x61 && $integer <= 0x7A || $integer >= 0x30 && $integer <= 0x39 || $integer === 0x2D || $integer === 0x2E || $integer === 0x5F || $integer === 0x7E)
                                {
                                    return chr($integer);
                                }
                                else
                        Severity: Critical
                        Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Misc.php - About 2 hrs to fix

                          Method print_header_image_template has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function print_header_image_template() {
                                  ?>
                                  <script type="text/template" id="tmpl-header-choice">
                                      <# if (data.random) { #>
                                              <button type="button" class="button display-options random">
                          Severity: Minor
                          Found in Web.Admin/2014/wordpress/wp-includes/class-wp-customize-control.php - About 2 hrs to fix

                            Consider simplifying this complex logical expression.
                            Open

                                    if ( isset( $hour ) && ! isset( $minute ) && ! isset( $second ) && false !== ( $value = $this->build_value( $compare, $hour ) ) ) {
                                        return "HOUR( $column ) $compare $value";
                                    } elseif ( ! isset( $hour ) && isset( $minute ) && ! isset( $second ) && false !== ( $value = $this->build_value( $compare, $minute ) ) ) {
                                        return "MINUTE( $column ) $compare $value";
                                    } elseif ( ! isset( $hour ) && ! isset( $minute ) && isset( $second ) && false !== ( $value = $this->build_value( $compare, $second ) ) ) {
                            Severity: Critical
                            Found in Web.Admin/2014/wordpress/wp-includes/date.php - About 2 hrs to fix

                              Method render has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  function render($diff)
                                  {
                                      $xi = $yi = 1;
                                      $block = false;
                                      $context = array();
                              Severity: Minor
                              Found in Web.Admin/2014/wordpress/wp-includes/Text/Diff/Renderer.php - About 2 hrs to fix

                                Consider simplifying this complex logical expression.
                                Open

                                        if ($integer >= 0x41 && $integer <= 0x5A || $integer >= 0x61 && $integer <= 0x7A || $integer >= 0x30 && $integer <= 0x39 || $integer === 0x2D || $integer === 0x2E || $integer === 0x5F || $integer === 0x7E)
                                        {
                                            return chr($integer);
                                        }
                                        else
                                Severity: Critical
                                Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 2 hrs to fix

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

                                      getCompleteChars : function() {
                                          var cChars = '';
                                          for(var i=0;i<Language.complete.length;i++)
                                              cChars += '|'+Language.complete[i].input;
                                          return cChars+'|';
                                  Web.Admin/2014/wordpress/wp-includes/js/codepress/engines/gecko.js on lines 165..170
                                  Web.Admin/2014/wordpress/wp-includes/js/codepress/engines/opera.js on lines 165..170

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

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

                                      getCompleteChars : function() {
                                          var cChars = '';
                                          for(var i=0;i<Language.complete.length;i++)
                                              cChars += '|'+Language.complete[i].input;
                                          return cChars+'|';
                                  Web.Admin/2014/wordpress/wp-includes/js/codepress/engines/msie.js on lines 172..177
                                  Web.Admin/2014/wordpress/wp-includes/js/codepress/engines/opera.js on lines 165..170

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

                                  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

                                          {
                                              return { x: a[0], y: a[1], x2: a[2], y2: a[3],
                                                  w: a[2] - a[0], h: a[3] - a[1] };
                                          };
                                  Web.Admin/2014/wordpress/wp-includes/js/jcrop/jquery.Jcrop.js on lines 59..59

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

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

                                      getCompleteChars : function() {
                                          var cChars = '';
                                          for(var i=0;i<Language.complete.length;i++)
                                              cChars += '|'+Language.complete[i].input;
                                          return cChars+'|';
                                  Web.Admin/2014/wordpress/wp-includes/js/codepress/engines/gecko.js on lines 165..170
                                  Web.Admin/2014/wordpress/wp-includes/js/codepress/engines/msie.js on lines 172..177

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

                                  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