CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

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

        static $lookup = array (
             0 => 'Other',
             1 => '32x32 pixels \'file icon\' (PNG only)',
             2 => 'Other file icon',
             3 => 'Cover (front)',
Web.Admin/2014/wordpress/wp-includes/ID3/module.tag.id3v2.php on lines 2902..2924

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

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

        foreach ( $this->handlers as $priority => $handlers ) {
            foreach ( $handlers as $id => $handler ) {
                if ( preg_match( $handler['regex'], $url, $matches ) && is_callable( $handler['callback'] ) ) {
                    if ( false !== $return = call_user_func( $handler['callback'], $matches, $attr, $url, $rawattr ) )
                        return apply_filters( 'embed_handler_html', $return, $url, $attr );
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/media.php and 1 other location - About 1 hr to fix
Web.Admin/2014/wordpress/wp-includes/class-wp-embed.php on lines 157..175

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

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

        static $APICPictureTypeLookup = array(
            0x00 => 'Other',
            0x01 => '32x32 pixels \'file icon\' (PNG only)',
            0x02 => 'Other file icon',
            0x03 => 'Cover (front)',
Web.Admin/2014/wordpress/wp-includes/ID3/module.audio.flac.php on lines 416..438

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

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

                        _apply: function (file, fn){
                            api.log('FlashAPI.Image._apply:', file);

                            if( _isHtmlFile(file) ){
                                this.parent.apply(this, arguments);
Severity: Minor
Found in Web.Admin/z-scripts/FileAPI.js - About 1 hr to fix

    Function _call has 40 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        _call: function( type, url, params, callback ) {
    
            url = 'https://picasaweb.google.com/data/feed/api/' + url + '?';
    
            if (typeof params == 'function') {
    Severity: Minor
    Found in Web.Admin/2015/js/galleria/plugins/picasa/galleria.picasa.js - About 1 hr to fix

      Function open has 40 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          this.open = function( args, params ) {
              var $element,
                  self = this,
                  wp = this.wp;
      
      

        Function getAttrib has 40 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            getAttrib : function(e, at) {
                var ed = tinyMCEPopup.editor, dom = ed.dom, v, v2;
        
                if (ed.settings.inline_styles) {
                    switch (at) {

          Function _call has 40 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              _call: function( type, url, params, callback ) {
          
                  url = 'https://picasaweb.google.com/data/feed/api/' + url + '?';
          
                  if (typeof params == 'function') {
          Severity: Minor
          Found in Web.Admin/Content/galleria/plugins/picasa/galleria.picasa.js - About 1 hr to fix

            Function createToolbar has 40 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    createToolbar: function() {
                        var filters, FiltersConstructor;
            
                        /**
                         * @member {wp.media.view.Toolbar}
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js - About 1 hr to fix

              Method get_sample_permalink_html has 40 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) {
                  $post = &get_post($id);
                  list($permalink, $post_name) = get_sample_permalink($post->ID, $new_title, $new_slug);
              
                  if ( 'publish' == $post->post_status ) {
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-admin/includes/post.php - About 1 hr to fix

                Method wp_dashboard has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function wp_dashboard() {
                    global $screen_layout_columns;
                
                    $hide2 = $hide3 = $hide4 = '';
                    switch ( $screen_layout_columns ) {
                Severity: Minor
                Found in Web.Admin/2014/wordpress/wp-admin/includes/dashboard.php - About 1 hr to fix

                  Method send_confirmation_on_profile_email has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function send_confirmation_on_profile_email() {
                      global $errors, $wpdb;
                      $current_user = wp_get_current_user();
                      if ( ! is_object($errors) )
                          $errors = new WP_Error();
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-admin/includes/ms.php - About 1 hr to fix

                    Method wp_generate_attachment_metadata has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function wp_generate_attachment_metadata( $attachment_id, $file ) {
                        $attachment = get_post( $attachment_id );
                    
                        $metadata = array();
                        if ( preg_match('!^image/!', get_post_mime_type( $attachment )) && file_is_displayable_image($file) ) {
                    Severity: Minor
                    Found in Web.Admin/2014/wordpress/wp-admin/includes/image.php - About 1 hr to fix

                      Method wp_ajax_add_tag has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function wp_ajax_add_tag() {
                          global $wp_list_table;
                      
                          check_ajax_referer( 'add-tag', '_wpnonce_add-tag' );
                          $post_type = !empty($_POST['post_type']) ? $_POST['post_type'] : 'post';
                      Severity: Minor
                      Found in Web.Admin/2014/wordpress/wp-admin/includes/ajax-actions.php - About 1 hr to fix

                        Method greet has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function greet() {
                                $this->header();
                        ?>
                        <p><?php _e('This is a basic GreyMatter to WordPress import script.') ?></p>
                        <p><?php _e('What it does:') ?></p>
                        Severity: Minor
                        Found in Web.Admin/2014/wordpress/wp-admin/import/greymatter.php - About 1 hr to fix

                          Method step2 has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function step2() {
                                  set_time_limit( 0 );
                                  update_option( 'ljapi_step', 2 );
                                  $this->username = get_option( 'ljapi_username' );
                                  $this->password = get_option( 'ljapi_password' );
                          Severity: Minor
                          Found in Web.Admin/2014/wordpress/wp-admin/import/livejournal.php - About 1 hr to fix

                            Method signup_another_blog has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function signup_another_blog( $blogname = '', $blog_title = '', $errors = '' ) {
                                $current_user = wp_get_current_user();
                            
                                if ( ! is_wp_error($errors) ) {
                                    $errors = new WP_Error();
                            Severity: Minor
                            Found in Web.Admin/2014/wordpress/wp-signup.php - About 1 hr to fix

                              Method wp_getUsers has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  function wp_getUsers( $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 1 hr to fix

                                Method wp_getTerms has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

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

                                  Method query has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      function query() {
                                          $args = func_get_args();
                                          $method = array_shift($args);
                                          $request = new IXR_Request($method, $args);
                                          $xml = $request->getXml();
                                  Severity: Minor
                                  Found in Web.Admin/2014/wordpress/wp-includes/class-wp-http-ixr-client.php - About 1 hr to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language