suitmedia/suitcoda

View on GitHub

Showing 784 of 784 total issues

Function offset has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    offset: function( options ) {
        if ( arguments.length ) {
            return options === undefined ?
                this :
                this.each(function( i ) {
Severity: Minor
Found in _frontend/dev/js/vendor/jquery.js - About 1 hr to fix

    Function off has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        off: function( types, selector, fn ) {
            var handleObj, type;
            if ( types && types.preventDefault && types.handleObj ) {
                // ( event )  dispatched jQuery.Event
                handleObj = types.handleObj;
    Severity: Minor
    Found in _frontend/dev/js/vendor/jquery.js - About 1 hr to fix

      Function * has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              "*": [ function( prop, value ) {
                  var tween = this.createTween( prop, value ),
                      target = tween.cur(),
                      parts = rfxnum.exec( value ),
                      unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
      Severity: Minor
      Found in _frontend/dev/js/vendor/jquery.js - About 1 hr to fix

        Function isEventSupported has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            isEventSupported = (function() {
        
              var TAGNAMES = {
                'select': 'input', 'change': 'input',
                'submit': 'form', 'reset': 'form',
        Severity: Minor
        Found in _frontend/dev/js/vendor/modernizr.js - About 1 hr to fix

          Function bind has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                Function.prototype.bind = function bind(that) {
          
                  var target = this;
          
                  if (typeof target != "function") {
          Severity: Minor
          Found in _frontend/dev/js/vendor/modernizr.js - About 1 hr to fix

            Consider simplifying this complex logical expression.
            Open

                                        if (!y || (y && !z[y.type]) || (y.is_beacon && !u) || (y.after_onload && !A)) {
                                            continue
                                        }
            Severity: Major
            Found in performance/yslow.js - About 1 hr to fix

              Consider simplifying this complex logical expression.
              Open

                                      if (H && G && z && y) {
                                          z.innerHTML = (x ? x : "");
                                          y.innerHTML = (w ? w : "");
                                          r = H.getElementsByTagName("input");
                                          for (D = 0; D < r.length; D += 1) {
              Severity: Major
              Found in performance/yslow.js - About 1 hr to fix

                Consider simplifying this complex logical expression.
                Open

                        if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
                                support.getById && context.nodeType === 9 && documentIsHTML &&
                                Expr.relative[ tokens[1].type ] ) {
                
                            context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
                Severity: Major
                Found in _frontend/assets/js/vendor/jquery.min.js - About 1 hr to fix

                  Consider simplifying this complex logical expression.
                  Open

                          if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
                                  support.getById && context.nodeType === 9 && documentIsHTML &&
                                  Expr.relative[ tokens[1].type ] ) {
                  
                              context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
                  Severity: Major
                  Found in _frontend/dev/js/vendor/jquery.js - About 1 hr to fix

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

                                                case "gzip":
                                                    w = q.size_compressed ? Number(q.size_compressed) : 0;
                                                    v = y.size_compressed ? Number(y.size_compressed) : 0;
                                                    break;
                    Severity: Major
                    Found in performance/yslow.js and 2 other locations - About 1 hr to fix
                    performance/yslow.js on lines 5003..5006
                    performance/yslow.js on lines 5025..5028

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

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

                                                case "respTime":
                                                    w = q.respTime ? Number(q.respTime) : 0;
                                                    v = y.respTime ? Number(y.respTime) : 0;
                                                    break;
                    Severity: Major
                    Found in performance/yslow.js and 2 other locations - About 1 hr to fix
                    performance/yslow.js on lines 5003..5006
                    performance/yslow.js on lines 5007..5010

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

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

                                                case "size":
                                                    w = q.size ? Number(q.size) : 0;
                                                    v = y.size ? Number(y.size) : 0;
                                                    break;
                    Severity: Major
                    Found in performance/yslow.js and 2 other locations - About 1 hr to fix
                    performance/yslow.js on lines 5007..5010
                    performance/yslow.js on lines 5025..5028

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

                    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

                                            return {
                                                score: s,
                                                message: (v.length > 0) ? YSLOW.util.plural("There %are% %num% JavaScript script%s%", v.length) + " found in the head of the document" : "",
                                                components: v
                                            }
                    Severity: Major
                    Found in performance/yslow.js and 3 other locations - About 55 mins to fix
                    performance/yslow.js on lines 2747..2751
                    performance/yslow.js on lines 2774..2778
                    performance/yslow.js on lines 2801..2805

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

                    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 (t.PAGE.overallScore) {
                                                s = YSLOW.util.prettyScore(t.PAGE.overallScore);
                                                this.setStatusBar(s, "yslow_status_grade")
                                            }
                    Severity: Minor
                    Found in performance/yslow.js and 1 other location - About 55 mins to fix
                    performance/yslow.js on lines 4633..4636

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

                    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 (t.PAGE.totalSize) {
                                                q = YSLOW.util.kbSize(t.PAGE.totalSize);
                                                this.setStatusBar(q, "yslow_status_size")
                                            }
                    Severity: Minor
                    Found in performance/yslow.js and 1 other location - About 55 mins to fix
                    performance/yslow.js on lines 4629..4632

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

                    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

                                            return {
                                                score: s,
                                                message: (v.length > 0) ? YSLOW.util.plural("There %are% %num% stylesheet%s%", v.length) + " found in the body of the document" : "",
                                                components: v
                                            }
                    Severity: Major
                    Found in performance/yslow.js and 3 other locations - About 55 mins to fix
                    performance/yslow.js on lines 2747..2751
                    performance/yslow.js on lines 2774..2778
                    performance/yslow.js on lines 2825..2829

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

                    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

                                            return {
                                                score: s,
                                                message: (v.length > 0) ? YSLOW.util.plural("There %are% %num% static component%s%", v.length) + " without a far-future expiration date." : "",
                                                components: v
                                            }
                    Severity: Major
                    Found in performance/yslow.js and 3 other locations - About 55 mins to fix
                    performance/yslow.js on lines 2774..2778
                    performance/yslow.js on lines 2801..2805
                    performance/yslow.js on lines 2825..2829

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

                    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

                                            return {
                                                score: s,
                                                message: (v.length > 0) ? YSLOW.util.plural("There %are% %num% plain text component%s%", v.length) + " that should be sent compressed" : "",
                                                components: v
                                            }
                    Severity: Major
                    Found in performance/yslow.js and 3 other locations - About 55 mins to fix
                    performance/yslow.js on lines 2747..2751
                    performance/yslow.js on lines 2801..2805
                    performance/yslow.js on lines 2825..2829

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

                    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 notNeeded has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                    FastClick.notNeeded = function(layer) {
                        'use strict';
                        var metaViewport;
                    
                        // Devices that don't support touch don't need FastClick
                    Severity: Minor
                    Found in _frontend/assets/js/vendor/fastclick.min.js - About 55 mins to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    Function notNeeded has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                    FastClick.notNeeded = function(layer) {
                        'use strict';
                        var metaViewport;
                    
                        // Devices that don't support touch don't need FastClick
                    Severity: Minor
                    Found in _frontend/dev/js/vendor/fastclick.js - About 55 mins to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    Severity
                    Category
                    Status
                    Source
                    Language