CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

Method inline_edit has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function inline_edit() {
        $tax = get_taxonomy( $this->screen->taxonomy );

        if ( ! current_user_can( $tax->cap->edit_terms ) )
            return;

    Method make_site_theme_from_default has 41 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function make_site_theme_from_default($theme_name, $template) {
        $site_dir = WP_CONTENT_DIR . "/themes/$template";
        $default_dir = WP_CONTENT_DIR . '/themes/default';
    
        // Copy files from the default theme to the site theme.
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-admin/includes/upgrade.php - About 1 hr to fix

      Method link_submit_meta_box has 41 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function link_submit_meta_box($link) {
      ?>
      <div class="submitbox" id="submitlink">
      
      <div id="minor-publishing">
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-admin/includes/meta-boxes.php - About 1 hr to fix

        Method wp_getComment has 41 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function wp_getComment($args) {
                $this->escape($args);
        
                $blog_id    = (int) $args[0];
                $username    = $args[1];
        Severity: Minor
        Found in Web.Admin/2014/wordpress/xmlrpc.php - About 1 hr to fix

          Method wp_editComment has 41 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function wp_editComment($args) {
                  $this->escape($args);
          
                  $blog_id    = (int) $args[0];
                  $username    = $args[1];
          Severity: Minor
          Found in Web.Admin/2014/wordpress/xmlrpc.php - About 1 hr to fix

            Method wp_newTerm has 41 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function wp_newTerm( $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 ParseOggPageHeader has 41 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function ParseOggPageHeader() {
                      // http://xiph.org/ogg/vorbis/doc/framing.html
                      $oggheader['page_start_offset'] = $this->ftell(); // where we started from in the file
              
                      $filedata = $this->fread($this->getid3->fread_buffer_size());
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio.ogg.php - About 1 hr to fix

                Method readData has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function readData() {
                        $value = null;
                
                        $type = $this->stream->readByte();
                        switch ($type) {
                Severity: Minor
                Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio-video.flv.php - About 1 hr to fix

                  Method CalculateCompressionRatioVideo has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function CalculateCompressionRatioVideo() {
                          if (empty($this->info['video'])) {
                              return false;
                          }
                          if (empty($this->info['video']['resolution_x']) || empty($this->info['video']['resolution_y'])) {
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-includes/ID3/getid3.php - About 1 hr to fix

                    Method wp_admin_bar_new_content_menu has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function wp_admin_bar_new_content_menu( $wp_admin_bar ) {
                        $actions = array();
                    
                        $cpts = (array) get_post_types( array( 'show_in_admin_bar' => true ), 'objects' );
                    
                    
                    Severity: Minor
                    Found in Web.Admin/2014/wordpress/wp-includes/admin-bar.php - About 1 hr to fix

                      Method image_resize has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function image_resize( $file, $max_w, $max_h, $crop = false, $suffix = null, $dest_path = null, $jpeg_quality = 90 ) {
                      
                          $image = wp_load_image( $file );
                          if ( !is_resource( $image ) )
                              return new WP_Error('error_loading_image', $image);
                      Severity: Minor
                      Found in Web.Admin/2014/wordpress/wp-includes/media.php - About 1 hr to fix

                        Method wp_upload_dir has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function wp_upload_dir( $time = null ) {
                            $siteurl = get_option( 'siteurl' );
                            $upload_path = get_option( 'upload_path' );
                            $upload_path = trim($upload_path);
                            if ( empty($upload_path) ) {
                        Severity: Minor
                        Found in Web.Admin/2014/wordpress/wp-includes/functions.php - About 1 hr to fix

                          Method sanitize_user_field has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function sanitize_user_field($field, $value, $user_id, $context) {
                              $int_fields = array('ID');
                              if ( in_array($field, $int_fields) )
                                  $value = (int) $value;
                          
                          
                          Severity: Minor
                          Found in Web.Admin/2014/wordpress/wp-includes/user.php - About 1 hr to fix

                            Method convert_chars has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function convert_chars($content, $deprecated = '') {
                                // Translation of invalid Unicode references range to valid range
                                $wp_htmltranswinuni = array(
                                '&#128;' => '&#8364;', // the Euro sign
                                '&#129;' => '',
                            Severity: Minor
                            Found in Web.Admin/2014/wordpress/wp-includes/formatting.php - About 1 hr to fix

                              Method _wp_upgrade_revisions_of_post has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function _wp_upgrade_revisions_of_post( $post, $revisions ) {
                                  global $wpdb;
                              
                                  // Add post option exclusively
                                  $lock = "revision-upgrade-{$post->ID}";
                              Severity: Minor
                              Found in Web.Admin/2014/wordpress/wp-includes/revision.php - About 1 hr to fix

                                Method GetGuestPackages has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        public List<GuestPackage> GetGuestPackages(string year)
                                        {
                                            var tournament = Tournaments.Single(x => x.Year == year);
                                            var guestPackages = GuestPackages.Where(x => x.TournamentId == tournament.Id).ToList();
                                
                                Severity: Minor
                                Found in ReadModels/TournamentQueries.cs - About 1 hr to fix

                                  Method Then has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          protected Action<object> Then(params object[] expectedEvents)
                                          {
                                              return got =>
                                              {
                                                  var gotEvents = got as object[];
                                  Severity: Minor
                                  Found in Edument.CQRS/BDDTest.cs - About 1 hr to fix

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

                                                    case 'multiple':
                                                        if ( $category->parent )
                                                            $thelist .= get_category_parents( $category->parent, true, $separator );
                                                        $thelist .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $category->name ) ) . '" ' . $rel . '>' . $category->name.'</a></li>';
                                                        break;
                                    Severity: Major
                                    Found in Web.Admin/2014/wordpress/wp-includes/category-template.php and 1 other location - About 1 hr to fix
                                    Web.Admin/2014/wordpress/wp-includes/category-template.php on lines 213..217

                                    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 ) )
                                                            /**
                                    Severity: Major
                                    Found in Web.Admin/2014/wordpress/wp-includes/class-wp-embed.php and 1 other location - About 1 hr to fix
                                    Web.Admin/2014/wordpress/wp-includes/media.php on lines 1072..1079

                                    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

                                                    case 'multiple':
                                                        if ( $category->parent )
                                                            $thelist .= get_category_parents( $category->parent, true, $separator );
                                                        $thelist .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $category->name ) ) . '" ' . $rel . '>' . $category->cat_name.'</a>';
                                                        break;
                                    Severity: Major
                                    Found in Web.Admin/2014/wordpress/wp-includes/category-template.php and 1 other location - About 1 hr to fix
                                    Web.Admin/2014/wordpress/wp-includes/category-template.php on lines 190..194

                                    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

                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language