CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

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

            if ( !empty($this->query_vars['withcomments'])
                || ( empty($this->query_vars['withoutcomments'])
                    && ( !empty($this->query_vars['p'])
                        || !empty($this->query_vars['name'])
                        || !empty($this->query_vars['page_id'])
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/classes.php and 1 other location - About 40 mins to fix
Web.Admin/2014/wordpress/wp-includes/class-wp.php on lines 364..374

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

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

                if (strlen($matches[$i][3][0]) <= 2)
                {
                    $return[$i]['self_closing'] = true;
                }
                else
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 1 other location - About 40 mins to fix
Web.Admin/2014/wordpress/wp-includes/SimplePie/Misc.php on lines 109..117

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

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

            if ( !empty($this->query_vars['withcomments'])
                || false !== strpos( $this->query_vars['feed'], 'comments-' )
                || ( empty($this->query_vars['withoutcomments'])
                    && ( !empty($this->query_vars['p'])
                        || !empty($this->query_vars['name'])
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-wp.php and 1 other location - About 40 mins to fix
Web.Admin/2014/wordpress/wp-includes/classes.php on lines 320..329

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

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

        if (strtolower(substr($this->file->body, $ws, 14)) === '<!doctype html'
            || strtolower(substr($this->file->body, $ws, 5)) === '<html'
            || strtolower(substr($this->file->body, $ws, 7)) === '<script')
        {
            return 'text/html';
Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 13583..13617

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

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

                if (strlen($matches[$i][3][0]) <= 2)
                {
                    $return[$i]['self_closing'] = true;
                }
                else
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Misc.php and 1 other location - About 40 mins to fix
Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 9172..9180

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

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

                    if ($this->base_location < $link['offset'])
                    {
                        $href = SimplePie_Misc::absolutize_url(trim($link['attribs']['href']['data']), $this->base);
                    }
                    else
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 1 other location - About 40 mins to fix
Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 14184..14191

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

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

                if ($this->base_location < $link['offset'])
                {
                    $href = SimplePie_Misc::absolutize_url(trim($link['attribs']['href']['data']), $this->base);
                }
                else
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 1 other location - About 40 mins to fix
Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 14226..14233

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

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

        if (strtolower(substr($this->file->body, $ws, 14)) === '<!doctype html'
            || strtolower(substr($this->file->body, $ws, 5)) === '<html'
            || strtolower(substr($this->file->body, $ws, 7)) === '<script')
        {
            return 'text/html';
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 1 other location - About 40 mins to fix
Web.Admin/2014/wordpress/wp-includes/SimplePie/Content/Type/Sniffer.php on lines 176..214

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

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 ( $post_name_check || in_array($slug, $wp_rewrite->feeds) ) {
            $suffix = 2;
            do {
                $alt_post_name = substr($slug, 0, 200-(strlen($suffix)+1)). "-$suffix";
                $post_name_check = $wpdb->get_var($wpdb->prepare($check_sql, $alt_post_name, $post_type, $post_ID));
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/post.php and 1 other location - About 40 mins to fix
Web.Admin/2014/wordpress/wp-includes/post.php on lines 1983..1991

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

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 static function should_decode($headers) {
        if ( is_array( $headers ) ) {
            if ( array_key_exists('content-encoding', $headers) && ! empty( $headers['content-encoding'] ) )
                return true;
        } else if ( is_string( $headers ) ) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-http.php and 1 other location - About 40 mins to fix
Web.Admin/2014/wordpress/wp-includes/http.php on lines 1915..1924

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

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 should_decode($headers) {
        if ( is_array( $headers ) ) {
            if ( array_key_exists('content-encoding', $headers) && ! empty( $headers['content-encoding'] ) )
                return true;
        } else if ( is_string( $headers ) ) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/http.php and 1 other location - About 40 mins to fix
Web.Admin/2014/wordpress/wp-includes/class-http.php on lines 2096..2105

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

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 ( $post_name_check || in_array($slug, $feeds) ) {
            $suffix = 2;
            do {
                $alt_post_name = substr($slug, 0, 200-(strlen($suffix)+1)). "-$suffix";
                $post_name_check = $wpdb->get_var($wpdb->prepare($check_sql, $alt_post_name, $post_ID, $post_parent));
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/post.php and 1 other location - About 40 mins to fix
Web.Admin/2014/wordpress/wp-includes/post.php on lines 1997..2005

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

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

        private IWebElement usernameTextField 
        { 
            get 
            { 
                _wait.Until(driver => driver.FindElement(By.Id("UserName")));
Severity: Minor
Found in UITestsFramework/Pages/RegisterPage.cs and 1 other location - About 40 mins to fix
UITestsFramework/Pages/LoginPage.cs on lines 11..18

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

        private IWebElement usernameTextField 
        { 
            get 
            { 
                _wait.Until(driver => driver.FindElement(By.Id("UserName")));
Severity: Minor
Found in UITestsFramework/Pages/LoginPage.cs and 1 other location - About 40 mins to fix
UITestsFramework/Pages/RegisterPage.cs on lines 11..18

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

Consider simplifying this complex logical expression.
Open

        if( navigator.plugins && typeof navigator.plugins['Shockwave Flash'] == 'object' ){
            has    = navigator.plugins['Shockwave Flash'].description && !(mime && mime['application/x-shockwave-flash'] && !mime['application/x-shockwave-flash'].enabledPlugin);
        }
        else {
            try {
Severity: Major
Found in Web.Admin/z-scripts/FileAPI.js - About 40 mins to fix

    Consider simplifying this complex logical expression.
    Open

    if (window.jasmine || window.mocha) {
    
      var currentSpec = null,
          annotatedFunctions = [],
          isSpecRunning = function() {
    Severity: Major
    Found in Web.Admin/z-scripts/angular-mocks.js - About 40 mins to fix

      Consider simplifying this complex logical expression.
      Open

                  if (arguments[0] && arguments[0].__isFileAPIShim) {
                      var formData = arguments[0];
                      var config = {
                          url: xhr.__url,
                          jsonp: false, //removes the callback form param
      Severity: Major
      Found in Web.Admin/z-scripts/ng-file-upload-shim.js - About 40 mins to fix

        Consider simplifying this complex logical expression.
        Open

                if ( !(button > 1 || e.ctrlKey || e.metaKey || e.shiftKey || element.attr('target')) ) {
                  // HACK: This is to allow ng-clicks to be processed before the transition is initiated:
                  var transition = $timeout(function() {
                    $state.go(ref.state, params, options);
                  });
        Severity: Major
        Found in Web.Admin/z-scripts/angular-ui-router.js - About 40 mins to fix

          Consider simplifying this complex logical expression.
          Open

                      if ((isInputTypeFile() && attribute.name !== 'type') 
                              || (attribute.name !== 'type' && attribute.name !== 'class' && 
                              attribute.name !== 'id' && attribute.name !== 'style')) {
                          fileElem.attr(attribute.name, attribute.value);
                      }
          Severity: Major
          Found in Web.Admin/z-scripts/ng-file-upload-all.js - About 40 mins to fix

            Consider simplifying this complex logical expression.
            Open

                        if (arguments[0] && arguments[0].__isFileAPIShim) {
                            var formData = arguments[0];
                            var config = {
                                url: xhr.__url,
                                jsonp: false, //removes the callback form param
            Severity: Major
            Found in Web.Admin/z-scripts/ng-file-upload-all.js - About 40 mins to fix
              Severity
              Category
              Status
              Source
              Language