CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

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

function delete_plugins($plugins, $redirect = '' ) {
    global $wp_filesystem;

    if( empty($plugins) )
        return false;
Severity: Major
Found in Web.Admin/2014/wordpress/wp-admin/includes/plugin.php - About 2 hrs to fix

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

        function parse_comment( $comment ) {
            global $wpdb;
    
            // Get the top-level attributes
            preg_match( '|<comment([^>]+)>|i', $comment, $attribs );
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-admin/import/livejournal.php - About 2 hrs to fix

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

      function search_theme_directories() {
          global $wp_theme_directories, $wp_broken_themes;
          if ( empty( $wp_theme_directories ) )
              return false;
      
      
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-includes/theme.php - About 2 hrs to fix

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

            function mw_newMediaObject($args) {
                global $wpdb;
        
                $blog_ID     = (int) $args[0];
                $username  = $this->escape($args[1]);
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php - About 2 hrs to fix

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

              public function openfile($filename) {
                  try {
                      if (!empty($this->startup_error)) {
                          throw new getid3_exception($this->startup_error);
                      }
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-includes/ID3/getid3.php - About 2 hrs to fix

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

            function wp_update_term( $term_id, $taxonomy, $args = array() ) {
                global $wpdb;
            
                if ( ! is_taxonomy($taxonomy) )
                    return new WP_Error('invalid_taxonomy', __('Invalid taxonomy'));
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-includes/taxonomy.php - About 2 hrs to fix

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

                  public static function MPEGaudioHeaderValid($rawarray, $echoerrors=false, $allowBitrate15=false) {
                      if (($rawarray['synch'] & 0x0FFE) != 0x0FFE) {
                          return false;
                      }
              
              
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio.mp3.php - About 2 hrs to fix

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

                    public function date_rfc2822($date)
                    {
                        static $pcre;
                        if (!$pcre)
                        {
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Parse/Date.php - About 2 hrs to fix

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

                  function wp_update_themes( ) {
                      global $wp_version;
                  
                      if( defined( 'WP_INSTALLING' ) )
                          return false;
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/wp-includes/update.php - About 2 hrs to fix

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

                        public function enqueue_scripts() {
                            wp_enqueue_style( 'customize-widgets' );
                            wp_enqueue_script( 'customize-widgets' );
                    
                            /** This action is documented in wp-admin/admin-header.php */
                    Severity: Major
                    Found in Web.Admin/2014/wordpress/wp-includes/class-wp-customize-widgets.php - About 2 hrs to fix

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

                      function wp_notify_postauthor($comment_id, $comment_type='') {
                          $comment = get_comment($comment_id);
                          $post    = get_post($comment->comment_post_ID);
                          $user    = get_userdata( $post->post_author );
                          $current_user = wp_get_current_user();
                      Severity: Major
                      Found in Web.Admin/2014/wordpress/wp-includes/pluggable.php - About 2 hrs to fix

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

                        function wp_salt($scheme = 'auth') {
                            global $wp_default_secret_key;
                            $secret_key = '';
                            if ( defined('SECRET_KEY') && ('' != SECRET_KEY) && ( $wp_default_secret_key != SECRET_KEY) )
                                $secret_key = SECRET_KEY;
                        Severity: Major
                        Found in Web.Admin/2014/wordpress/wp-includes/pluggable.php - About 2 hrs to fix

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

                              function date_rfc2822($date)
                              {
                                  static $pcre;
                                  if (!$pcre)
                                  {
                          Severity: Major
                          Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 2 hrs to fix

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

                            function get_links($category = -1, $before = '', $after = '<br />', $between = ' ', $show_images = true, $orderby = 'name',
                                        $show_description = true, $show_rating = false, $limit = -1, $show_updated = 1, $echo = true) {
                                _deprecated_function(__FUNCTION__, '0.0', 'get_bookmarks()');
                            
                                $order = 'ASC';
                            Severity: Major
                            Found in Web.Admin/2014/wordpress/wp-includes/deprecated.php - About 2 hrs to fix

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

                                  public static function wp_link_dialog() {
                                      $search_panel_visible = '1' == get_user_setting( 'wplink', '0' ) ? ' search-panel-visible' : '';
                              
                                      // display: none is required here, see #WP27605
                                      ?>
                              Severity: Major
                              Found in Web.Admin/2014/wordpress/wp-includes/class-wp-editor.php - About 2 hrs to fix

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

                                function wpmu_validate_user_signup($user_name, $user_email) {
                                    global $wpdb;
                                
                                    $errors = new WP_Error();
                                
                                
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/ms-functions.php - About 2 hrs to fix

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

                                  function wpmu_validate_blog_signup( $blogname, $blog_title, $user = '' ) {
                                      global $wpdb, $domain;
                                  
                                      $current_site = get_current_site();
                                      $base = $current_site->path;
                                  Severity: Major
                                  Found in Web.Admin/2014/wordpress/wp-includes/ms-functions.php - About 2 hrs to fix

                                    File class-wp-image-editor-imagick.php has 263 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    <?php
                                    /**
                                     * WordPress Imagick Image Editor
                                     *
                                     * @package WordPress

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

                                      dw_Rotator.pause = function(e) {    
                                          e = dw_Event.DOMit(e);
                                          var id = e.target.id;
                                          var obj = dw_Rotator.getInstanceById(id);
                                          if (obj) { obj.clearTimer(); }
                                      Severity: Major
                                      Found in Web.Admin/2015/js/dw_rotator.js and 1 other location - About 2 hrs to fix
                                      Web.Admin/2014/js/dw_rotator.js on lines 161..166

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

                                      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

                                      dw_Rotator.pause = function(e) {    
                                          e = dw_Event.DOMit(e);
                                          var id = e.target.id;
                                          var obj = dw_Rotator.getInstanceById(id);
                                          if (obj) { obj.clearTimer(); }
                                      Severity: Major
                                      Found in Web.Admin/2014/js/dw_rotator.js and 1 other location - About 2 hrs to fix
                                      Web.Admin/2015/js/dw_rotator.js on lines 161..166

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

                                      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