CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

Method get_pagenum_link has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function get_pagenum_link($pagenum = 1) {
    global $wp_rewrite;

    $pagenum = (int) $pagenum;

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/link-template.php - About 1 hr to fix

    Method add_option has 37 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function add_option( $option, $value = '', $deprecated = '', $autoload = 'yes' ) {
        global $wpdb;
    
        if ( !empty( $deprecated ) )
            _deprecated_argument( __FUNCTION__, '2.3' );
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-includes/option.php - About 1 hr to fix

      Method getXml has 37 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function getXml() {
              /* Return XML for this value */
              switch ($this->type) {
                  case 'boolean':
                      return '<boolean>'.(($this->data) ? '1' : '0').'</boolean>';
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/class-IXR.php - About 1 hr to fix

        Method sanitize_header has 37 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private function sanitize_header( $header, $value ) {
                switch ( $header ) {
                    case 'Status' :
                        if ( ! $value ) {
                            $value = 'publish';
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-includes/class-wp-theme.php - About 1 hr to fix

          Method update_option has 37 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function update_option( $option, $value ) {
              global $wpdb;
          
              $option = trim($option);
              if ( empty($option) )
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-includes/option.php - About 1 hr to fix

            Method wp_get_sites has 37 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function wp_get_sites( $args = array() ) {
                global $wpdb;
            
                if ( wp_is_large_network() )
                    return array();
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-includes/ms-functions.php - About 1 hr to fix

              Method sanitize_email has 37 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function sanitize_email( $email ) {
                  // Test for the minimum length the email can be
                  if ( strlen( $email ) < 3 ) {
                      return apply_filters( 'sanitize_email', '', $email, 'email_too_short' );
                  }
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-includes/formatting.php - About 1 hr to fix

                Method SmtpConnect has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  function SmtpConnect() {
                    if($this->smtp == NULL) {
                      $this->smtp = new SMTP();
                    }
                
                
                Severity: Minor
                Found in Web.Admin/2014/wordpress/wp-includes/class-phpmailer.php - About 1 hr to fix

                  Method wp_sprintf has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function wp_sprintf( $pattern ) {
                      $args = func_get_args( );
                      $len = strlen($pattern);
                      $start = 0;
                      $result = '';
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-includes/formatting.php - About 1 hr to fix

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

                            public IEnumerable Handle(Func<Guid, TournamentAggregate> al, CreateNews command)
                            {
                                var tournament = CommandQueries.GetTournaments().FirstOrDefault(x => x.Year == command.Year);
                                var agg = al(tournament.Id);
                    
                    Severity: Major
                    Found in Aggregates/Tournament/TournamentCommandHandlers.cs and 1 other location - About 1 hr to fix
                    Aggregates/Tournament/TournamentCommandHandlers.cs on lines 50..63

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

                    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

                            public IEnumerable Handle(Func<Guid, TournamentAggregate> al, CreateSponsor command)
                            {
                                var tournament = CommandQueries.GetTournaments().FirstOrDefault(x => x.Year == command.Year);
                                var agg = al(tournament.Id);
                    
                    Severity: Major
                    Found in Aggregates/Tournament/TournamentCommandHandlers.cs and 1 other location - About 1 hr to fix
                    Aggregates/Tournament/TournamentCommandHandlers.cs on lines 89..102

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

                    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

                        $plugins_allowedtags = array('a' => array('href' => array(),'title' => array(), 'target' => array()),
                                                    'abbr' => array('title' => array()),'acronym' => array('title' => array()),
                                                    'code' => array(), 'pre' => array(), 'em' => array(),'strong' => array(),
                                                    'ul' => array(), 'ol' => array(), 'li' => array(), 'p' => array(), 'br' => array());
                    Web.Admin/2014/wordpress/wp-admin/includes/class-wp-plugin-install-list-table.php on lines 193..198

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

                    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

                            $plugins_allowedtags = array(
                                'a' => array( 'href' => array(),'title' => array(), 'target' => array() ),
                                'abbr' => array( 'title' => array() ),'acronym' => array( 'title' => array() ),
                                'code' => array(), 'pre' => array(), 'em' => array(),'strong' => array(),
                                'ul' => array(), 'ol' => array(), 'li' => array(), 'p' => array(), 'br' => array()
                    Web.Admin/2014/wordpress/wp-admin/includes/plugin-install.php on lines 267..270

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

                    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

                        function __construct($args = array()) {
                            $defaults = array( 'type' => 'web', 'url' => '', 'plugin' => '', 'nonce' => '', 'title' => '' );
                            $args = wp_parse_args($args, $defaults);
                    
                            $this->type = $args['type'];
                    Web.Admin/2014/wordpress/wp-admin/includes/class-wp-upgrader-skins.php on lines 482..490
                    Web.Admin/2014/wordpress/wp-admin/includes/class-wp-upgrader.php on lines 959..967
                    Web.Admin/2014/wordpress/wp-admin/includes/class-wp-upgrader.php on lines 1014..1022

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

                    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

                        function __construct($args = array()) {
                            $defaults = array( 'type' => 'web', 'url' => '', 'theme' => '', 'nonce' => '', 'title' => '' );
                            $args = wp_parse_args($args, $defaults);
                    
                            $this->type = $args['type'];
                    Web.Admin/2014/wordpress/wp-admin/includes/class-wp-upgrader-skins.php on lines 407..415
                    Web.Admin/2014/wordpress/wp-admin/includes/class-wp-upgrader.php on lines 959..967
                    Web.Admin/2014/wordpress/wp-admin/includes/class-wp-upgrader.php on lines 1014..1022

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

                    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

                        function __construct($args = array()) {
                            $defaults = array( 'type' => 'web', 'url' => '', 'plugin' => '', 'nonce' => '', 'title' => '' );
                            $args = wp_parse_args($args, $defaults);
                    
                            $this->type = $args['type'];
                    Web.Admin/2014/wordpress/wp-admin/includes/class-wp-upgrader-skins.php on lines 407..415
                    Web.Admin/2014/wordpress/wp-admin/includes/class-wp-upgrader-skins.php on lines 482..490
                    Web.Admin/2014/wordpress/wp-admin/includes/class-wp-upgrader.php on lines 1014..1022

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

                    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

                        function __construct($args = array()) {
                            $defaults = array( 'type' => 'web', 'url' => '', 'theme' => '', 'nonce' => '', 'title' => '' );
                            $args = wp_parse_args($args, $defaults);
                    
                            $this->type = $args['type'];
                    Web.Admin/2014/wordpress/wp-admin/includes/class-wp-upgrader-skins.php on lines 407..415
                    Web.Admin/2014/wordpress/wp-admin/includes/class-wp-upgrader-skins.php on lines 482..490
                    Web.Admin/2014/wordpress/wp-admin/includes/class-wp-upgrader.php on lines 959..967

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

                    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

                            } else {
                                $actions['disable'] = '<a href="' . esc_url( wp_nonce_url($url . 'action=disable&amp;theme=' . $theme_key . '&amp;paged=' . $page . '&amp;s=' . $s, 'disable-theme_' . $stylesheet ) ) . '" title="' . esc_attr__('Disable this theme') . '">' . ( $this->is_site_themes ? __( 'Disable' ) : __( 'Network Disable' ) ) . '</a>';
                            }
                    Web.Admin/2014/wordpress/wp-admin/includes/class-wp-ms-themes-list-table.php on lines 283..284

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

                    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 'untrash':
                                $untrashed = 0;
                                foreach( (array) $post_ids as $post_id ) {
                                    if ( !current_user_can('delete_post', $post_id) )
                                        wp_die( __('You are not allowed to restore this post from the trash.') );
                    Severity: Major
                    Found in Web.Admin/2014/wordpress/wp-admin/edit.php and 1 other location - About 1 hr to fix
                    Web.Admin/2014/wordpress/wp-admin/edit-pages.php on lines 48..60

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

                    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

                                if ( ! $theme->errors() )
                                    $actions['enable'] = '<a href="' . esc_url( wp_nonce_url($url . 'action=enable&amp;theme=' . $theme_key . '&amp;paged=' . $page . '&amp;s=' . $s, 'enable-theme_' . $stylesheet ) ) . '" title="' . esc_attr__('Enable this theme') . '" class="edit">' . ( $this->is_site_themes ? __( 'Enable' ) : __( 'Network Enable' ) ) . '</a>';
                    Web.Admin/2014/wordpress/wp-admin/includes/class-wp-ms-themes-list-table.php on lines 285..287

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

                    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