CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

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

    rotate : function(angle, postid, nonce, t) {
        if ( $(t).hasClass('disabled') )
            return false;

        this.addStep({ 'r': { 'r': angle, 'fw': this.hold['h'], 'fh': this.hold['w'] }}, postid, nonce);
Severity: Major
Found in Web.Admin/2014/wordpress/wp-admin/js/image-edit.dev.js and 1 other location - About 2 hrs to fix
Web.Admin/2014/wordpress/wp-admin/js/image-edit.dev.js on lines 426..431

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

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

  function $httpBackend(method, url, data, callback, headers, timeout, withCredentials) {
    var xhr = new MockXhr(),
        expectation = expectations[0],
        wasExpected = false;

Severity: Major
Found in Web.Admin/z-scripts/angular-mocks.js - About 2 hrs to fix

    Function setAreaCoords has 61 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    },setAreaCoords:function(_1d,_1e,_1f,_20,_21){
    var _22=typeof _1e!="undefined"?_1e:false;
    var _23=typeof _1f!="undefined"?_1f:false;
    if(_1e){
    var _24=_1d.x2-_1d.x1;
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js - About 2 hrs to fix

      Function Tracker has 61 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          var Tracker = function()/*{{{*/
          {
              var onMove        = function() { },
                  onDone        = function() { },
                  trackDoc    = options.trackDocument;
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-includes/js/jcrop/jquery.Jcrop.dev.js - About 2 hrs to fix

        Method upgrade_160 has 61 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function upgrade_160() {
            global $wpdb, $wp_current_db_version;
        
            populate_roles_160();
        
        
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-admin/includes/upgrade.php - About 2 hrs to fix

          Method get_admin_page_title has 61 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function get_admin_page_title() {
              global $title;
              global $menu;
              global $submenu;
              global $pagenow;
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-admin/includes/plugin.php - About 2 hrs to fix

            Method _data_prepare has 61 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function _data_prepare($mode=FTP_ASCII) {
                    if(!$this->_settype($mode)) return FALSE;
                    $this->SendMSG("Creating data socket");
                    $this->_ftp_data_sock = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
                    if ($this->_ftp_data_sock < 0) {
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-admin/includes/class-ftp-sockets.php - About 2 hrs to fix

              Method wp_xmlrpc_server has 61 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function wp_xmlrpc_server() {
                      $this->methods = array(
                          // WordPress API
                          'wp.getUsersBlogs'        => 'this:wp_getUsersBlogs',
                          'wp.getPage'            => 'this:wp_getPage',
              Severity: Major
              Found in Web.Admin/2014/wordpress/xmlrpc.php - About 2 hrs to fix

                Method BigEndian2Float has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public static function BigEndian2Float($byteword) {
                        // ANSI/IEEE Standard 754-1985, Standard for Binary Floating Point Arithmetic
                        // http://www.psc.edu/general/software/packages/ieee/ieee.html
                        // http://www.scri.fsu.edu/~jac/MAD3401/Backgrnd/ieee.html
                
                
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-includes/ID3/getid3.lib.php - About 2 hrs to fix

                  Method get_date has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function get_date($date_format = 'j F Y, g:i a')
                      {
                          if (!isset($this->data['date']))
                          {
                              if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'published'))
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php - About 2 hrs to fix

                    Method get_date has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function get_date($date_format = 'j F Y, g:i a')
                        {
                            if (!isset($this->data['date']))
                            {
                                if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'published'))
                    Severity: Major
                    Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 2 hrs to fix

                      Method CreateBody has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        function CreateBody() {
                          $result = '';
                          if ($this->sign_key_file) {
                            $result .= $this->GetMailMIME();
                          }
                      Severity: Major
                      Found in Web.Admin/2014/wordpress/wp-includes/class-phpmailer.php - About 2 hrs to fix

                        Method editor has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public static function editor( $content, $editor_id, $settings = array() ) {
                        
                                $set = self::parse_settings( $editor_id, $settings );
                                $editor_class = ' class="' . trim( $set['editor_class'] . ' wp-editor-area' ) . '"';
                                $tabindex = $set['tabindex'] ? ' tabindex="' . (int) $set['tabindex'] . '"' : '';
                        Severity: Major
                        Found in Web.Admin/2014/wordpress/wp-includes/class-wp-editor.php - About 2 hrs to fix

                          Method tag_close has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function tag_close($parser, $tag) {
                                  $valueFlag = false;
                                  switch($tag) {
                                      case 'int':
                                      case 'i4':
                          Severity: Major
                          Found in Web.Admin/2014/wordpress/wp-includes/class-IXR.php - About 2 hrs to fix

                            Method get_status_header_desc has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function get_status_header_desc( $code ) {
                                global $wp_header_to_desc;
                            
                                $code = absint( $code );
                            
                            
                            Severity: Major
                            Found in Web.Admin/2014/wordpress/wp-includes/functions.php - About 2 hrs to fix

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

                                          foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'link') as $link)
                                          {
                                              if (isset($link['attribs']['']['href']))
                                              {
                                                  $link_rel = (isset($link['attribs']['']['rel'])) ? $link['attribs']['']['rel'] : 'alternate';
                              Severity: Major
                              Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 3 other locations - About 2 hrs to fix
                              Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php on lines 980..988
                              Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php on lines 989..996
                              Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 3690..3698

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

                              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

                                  function get_value()
                                  {
                                      $quote = substr($this->data, $this->position, 1);
                                      if ($quote === '"' || $quote === "'")
                                      {
                              Severity: Major
                              Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 1 other location - About 2 hrs to fix
                              Web.Admin/2014/wordpress/wp-includes/SimplePie/XML/Declaration/Parser.php on lines 175..190

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

                              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 ( !$q['suppress_filters'] ) {
                                          $where = apply_filters('posts_where_request', $where);
                                          $groupby = apply_filters('posts_groupby_request', $groupby);
                                          $join = apply_filters('posts_join_request', $join);
                                          $orderby = apply_filters('posts_orderby_request', $orderby);
                              Severity: Major
                              Found in Web.Admin/2014/wordpress/wp-includes/query.php and 1 other location - About 2 hrs to fix
                              Web.Admin/2014/wordpress/wp-includes/query.php on lines 2212..2221

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

                              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 4 locations. Consider refactoring.
                              Open

                                          foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'link') as $link)
                                          {
                                              if (isset($link['attribs']['']['href']))
                                              {
                                                  $link_rel = (isset($link['attribs']['']['rel'])) ? $link['attribs']['']['rel'] : 'alternate';
                              Severity: Major
                              Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php and 3 other locations - About 2 hrs to fix
                              Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php on lines 980..988
                              Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 3690..3698
                              Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 3699..3706

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

                              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 4 locations. Consider refactoring.
                              Open

                                          foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'link') as $link)
                                          {
                                              if (isset($link['attribs']['']['href']))
                                              {
                                                  $link_rel = (isset($link['attribs']['']['rel'])) ? $link['attribs']['']['rel'] : 'alternate';
                              Severity: Major
                              Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php and 3 other locations - About 2 hrs to fix
                              Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.php on lines 989..996
                              Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 3690..3698
                              Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 3699..3706

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

                              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