CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

Method wp_get_associated_nav_menu_items has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function wp_get_associated_nav_menu_items( $object_id = 0, $object_type = 'post_type', $taxonomy = '' ) {
    $object_id = (int) $object_id;
    $menu_item_ids = array();

    $query = new WP_Query;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/nav-menu.php - About 1 hr to fix

    Method get_attachment_icon has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function get_attachment_icon( $id = 0, $fullsize = false, $max_dims = false ) {
        $id = (int) $id;
        if ( !$post = & get_post($id) )
            return false;
    
    
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-includes/post-template.php - About 1 hr to fix

      Method parse_w3cdtf has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function parse_w3cdtf ( $date_str ) {
      
          # regex to match wc3dtf
          $pat = "/(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(:(\d{2}))?(?:([-+])(\d{2}):?(\d{2})|(Z))?/";
      
      
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/rss.php - About 1 hr to fix

        Method top has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function top ($msgNum, $numLines = "0") {
                //  Gets the header and first $numLines of the msg body
                //  returns data in an array with each returned line being
                //  an array element. If $numLines is empty, returns
                //  only the header information, and none of the body.
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-includes/class-pop3.php - About 1 hr to fix

          Method wp_text_diff has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function wp_text_diff( $left_string, $right_string, $args = null ) {
              $defaults = array( 'title' => '', 'title_left' => '', 'title_right' => '' );
              $args = wp_parse_args( $args, $defaults );
          
              if ( !class_exists( 'WP_Text_Diff_Renderer_Table' ) )
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-includes/pluggable.php - About 1 hr to fix

            Method change_encoding has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function change_encoding($data, $input, $output)
                {
                    $input = SimplePie_Misc::encoding($input);
                    $output = SimplePie_Misc::encoding($output);
            
            
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 1 hr to fix

              Method is_subclass_of has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function is_subclass_of($class1, $class2)
                  {
                      if (func_num_args() !== 2)
                      {
                          trigger_error('Wrong parameter count for SimplePie_Misc::is_subclass_of()', E_USER_WARNING);
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 1 hr to fix

                Method get_feed_tags has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function get_feed_tags($namespace, $tag)
                    {
                        $type = $this->get_type();
                        if ($type & SIMPLEPIE_TYPE_ATOM_10)
                        {
                Severity: Minor
                Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 1 hr to fix

                  Method IXR_IntrospectionServer has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function IXR_IntrospectionServer() {
                          $this->setCallbacks();
                          $this->setCapabilities();
                          $this->capabilities['introspection'] = array(
                              'specUrl' => 'http://xmlrpc.usefulinc.com/doc/reserved.html',
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-includes/class-IXR.php - About 1 hr to fix

                    Method date_i18n has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function date_i18n( $dateformatstring, $unixtimestamp = false, $gmt = false ) {
                        global $wp_locale;
                        $i = $unixtimestamp;
                        // Sanity check for PHP 5.1.0-
                        if ( false === $i || intval($i) < 0 ) {
                    Severity: Minor
                    Found in Web.Admin/2014/wordpress/wp-includes/functions.php - About 1 hr to fix

                      Method get_date_permastruct has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function get_date_permastruct() {
                              if (isset($this->date_structure)) {
                                  return $this->date_structure;
                              }
                      
                      
                      Severity: Minor
                      Found in Web.Admin/2014/wordpress/wp-includes/rewrite.php - About 1 hr to fix

                        Method wp_maintenance has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function wp_maintenance() {
                            if ( !file_exists( ABSPATH . '.maintenance' ) || defined( 'WP_INSTALLING' ) )
                                return;
                        
                            global $upgrading;
                        Severity: Minor
                        Found in Web.Admin/2014/wordpress/wp-includes/load.php - About 1 hr to fix

                          Method get_site_option has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function get_site_option( $option, $default = false, $use_cache = true ) {
                              global $wpdb;
                          
                              /**
                               * Filter an existing site option before it is retrieved.
                          Severity: Minor
                          Found in Web.Admin/2014/wordpress/wp-includes/option.php - About 1 hr to fix

                            Method add_site_option has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

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

                              Method CanCreateParticipant has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      [Test]
                                      public void CanCreateParticipant()
                                      {
                                          Test(
                                              Given(),
                              Severity: Minor
                              Found in Tests/ParticipantTests.cs - About 1 hr to fix

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

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

                                  Method get_output_format has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      protected function get_output_format( $filename = null, $mime_type = null ) {
                                          $new_ext = $file_ext = null;
                                          $file_mime = null;
                                  
                                          // By default, assume specified type takes priority
                                  Severity: Minor
                                  Found in Web.Admin/2014/wordpress/wp-includes/class-wp-image-editor.php - About 1 hr to fix

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

                                                editButton = DOM.add('wp_editbtns', 'img', {
                                                    src : t.url+'/img/image.png',
                                                    id : 'wp_editimgbtn',
                                                    width : '24',
                                                    height : '24',
                                    Web.Admin/2014/wordpress/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.dev.js on lines 170..176
                                    Web.Admin/2014/wordpress/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin.dev.js on lines 73..79
                                    Web.Admin/2014/wordpress/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin.dev.js on lines 87..93

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

                                    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

                                                dellButton = DOM.add('wp_editbtns', 'img', {
                                                    src : t.url+'/img/delete.png',
                                                    id : 'wp_delimgbtn',
                                                    width : '24',
                                                    height : '24',
                                    Web.Admin/2014/wordpress/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.dev.js on lines 156..162
                                    Web.Admin/2014/wordpress/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin.dev.js on lines 73..79
                                    Web.Admin/2014/wordpress/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin.dev.js on lines 87..93

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

                                    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

                                    function $w(string) {
                                      if (!Object.isString(string)) return [];
                                      string = string.strip();
                                      return string ? string.split(/\s+/) : [];
                                    }
                                    Web.Admin/2014/wordpress/wp-includes/js/prototype.js on lines 934..938

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

                                    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