CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

Function load has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

Galleria.prototype.load = function() {

    // pass if no data is provided or facebook option not found
    if ( arguments.length || typeof this._options.facebook !== 'string' ) {
        load.apply( this, Galleria.utils.array( arguments ) );
Severity: Minor
Found in Web.Admin/Content/galleria/plugins/facebook/galleria.facebook.js - About 1 hr to fix

    Method install_themes_dashboard has 45 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function install_themes_dashboard() {
        install_theme_search_form();
    ?>
    <h4><?php _e('Feature Filter') ?></h4>
    <form method="post" action="<?php echo admin_url( 'theme-install.php?tab=search' ); ?>">
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-admin/includes/theme-install.php - About 1 hr to fix

      Method choose_primary_blog has 45 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function choose_primary_blog() {
          ?>
          <table class="form-table">
          <tr>
          <?php /* translators: My sites label */ ?>
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-admin/includes/ms.php - About 1 hr to fix

        Method bulk_upgrade has 45 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function bulk_upgrade($plugins) {
        
                $this->init();
                $this->bulk = true;
                $this->upgrade_strings();
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-admin/includes/class-wp-upgrader.php - About 1 hr to fix

          Method print_column_headers has 45 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function print_column_headers( $with_id = true ) {
                  list( $columns, $hidden, $sortable ) = $this->get_column_info();
          
                  $current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
                  $current_url = remove_query_arg( 'paged', $current_url );
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-admin/includes/class-wp-list-table.php - About 1 hr to fix

            Method create_post has 45 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function create_post() {
                    global $blog_id, $user_ID;
                    $this->get_accepted_content_type($this->atom_content_types);
            
                    $parser = new AtomParser();
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-app.php - About 1 hr to fix

              Method wp_unique_post_slug has 45 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function wp_unique_post_slug($slug, $post_ID, $post_status, $post_type, $post_parent) {
                  if ( in_array( $post_status, array( 'draft', 'pending' ) ) )
                      return $slug;
              
                  global $wpdb, $wp_rewrite;
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-includes/post.php - About 1 hr to fix

                Method sanitize_post_field has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

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

                  Method remove_dot_segments has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      protected function remove_dot_segments($input)
                      {
                          $output = '';
                          while (strpos($input, './') !== false || strpos($input, '/.') !== false || $input === '.' || $input === '..')
                          {
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/IRI.php - About 1 hr to fix

                    Method remove_dot_segments has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function remove_dot_segments($input)
                        {
                            $output = '';
                            while (strpos($input, './') !== false || strpos($input, '/.') !== false || $input === '.' || $input === '..')
                            {
                    Severity: Minor
                    Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 1 hr to fix

                      Method remove_dot_segments has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function remove_dot_segments($input)
                          {
                              $output = '';
                              while (strpos($input, './') !== false || strpos($input, '/.') !== false || $input === '.' || $input === '..')
                              {
                      Severity: Minor
                      Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 1 hr to fix

                        Method get_allowed_on_site has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public static function get_allowed_on_site( $blog_id = null ) {
                                static $allowed_themes = array();
                        
                                if ( ! $blog_id || ! is_multisite() )
                                    $blog_id = get_current_blog_id();
                        Severity: Minor
                        Found in Web.Admin/2014/wordpress/wp-includes/class-wp-theme.php - About 1 hr to fix

                          Method remove_user_from_blog has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function remove_user_from_blog($user_id, $blog_id = '', $reassign = '') {
                              global $wpdb;
                              switch_to_blog($blog_id);
                              $user_id = (int) $user_id;
                              /**
                          Severity: Minor
                          Found in Web.Admin/2014/wordpress/wp-includes/ms-functions.php - About 1 hr to fix

                            Method get_option has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function get_option( $option, $default = false ) {
                                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 RegisterBundles has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      public static void RegisterBundles(BundleCollection bundles)
                                      {
                                          bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                                              "~/Scripts/jquery-{version}.js",
                                              "~/Scripts/jquery-ui-{version}.js",
                              Severity: Minor
                              Found in Web.Admin/App_Start/BundleConfig.cs - About 1 hr to fix

                                Method fill_query_vars has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    function fill_query_vars($array) {
                                        $keys = array(
                                            'error'
                                            , 'm'
                                            , 'p'
                                Severity: Minor
                                Found in Web.Admin/2014/wordpress/wp-includes/query.php - About 1 hr to fix

                                  Method Handle has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          public IEnumerable Handle(Func<Guid, ParticipantAggregate> al, CreateParticipant command)
                                          {
                                              var agg = al(command.Id);
                                  
                                              if (agg.EventsLoaded > 0)
                                  Severity: Minor
                                  Found in Aggregates/Participant/ParticipantCommandHandlers.cs - About 1 hr to fix

                                    Method BuildMatchTableHtml has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            public String BuildMatchTableHtml(Match match)
                                            {
                                                var scoreRows = "";
                                                for (var i = 0; i < match.Home.Bowlers.Count; i++)
                                                {
                                    Severity: Minor
                                    Found in ReadModels/DivisionGameCompleteSaga.cs - About 1 hr to fix

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

                                          if ( type = jQuery('#type-of-' + id).val() )
                                              jQuery('#' + type + '-counter').text( jQuery('#' + type + '-counter').text() - 1 );
                                      Web.Admin/2014/wordpress/wp-includes/js/plupload/handlers.js on lines 234..235

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

                                      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

                                      String.prototype.gsub.prepareReplacement = function(replacement) {
                                        if (Object.isFunction(replacement)) return replacement;
                                        var template = new Template(replacement);
                                        return function(match) { return template.evaluate(match) };
                                      };
                                      Severity: Major
                                      Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js and 1 other location - About 1 hr to fix
                                      Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js on lines 536..540

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

                                      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