suitmedia/suitcoda

View on GitHub

Showing 784 of 784 total issues

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

                                r[I] = M.domain + ": " + E("%num% component%s%, ", M.count) + x(M.sum_size) + (M.sum_size_compressed > 0 ? " (" + x(M.sum_size_compressed) + " GZip)" : "") + (H ? (" <button onclick=\"javascript:document.ysview.addCDN('" + M.domain + "')\">Add as CDN</button>") : "")
Severity: Major
Found in performance/yslow.js and 1 other location - About 1 hr to fix
performance/yslow.js on lines 2921..2921

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

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 ( isCharset ) {
                    if ( getCharset === "" || getCharset === null ) {
                        errDesc = 'Please fill the charset attribute on meta tag.';
                        pushErrMsg(errDesc);
                    } else if ( getCharset !== "utf-8" ) {
Severity: Major
Found in seo/seoChecker.js and 1 other location - About 1 hr to fix
seo/seoChecker.js on lines 195..204

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

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 (self.attr('data-lbNum').indexOf(numArrMin) != -1 && limMinVisible) {
                                    self.addClass('bi-lbNum-min').find('.bi-limSpan').html(limMinLabel).addClass('bi-limSpan-min');
                                }
Severity: Major
Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js and 1 other location - About 1 hr to fix
_frontend/assets/js/vendor/jquery-barIndicator.min.js on lines 704..706

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

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 (self.attr('data-lbNum').indexOf(numArrMax) != -1 && limMaxVisible) {
                                    self.addClass('bi-lbNum-max').find('.bi-limSpan').html(limMaxLabel).addClass('bi-limSpan-max');                                    
                                }
Severity: Major
Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js and 1 other location - About 1 hr to fix
_frontend/assets/js/vendor/jquery-barIndicator.min.js on lines 701..703

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

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

                                z[t] = s.domain + ": " + x("%num% component%s%, ", s.count) + w(s.sum_size) + (s.sum_size_compressed > 0 ? " (" + w(s.sum_size_compressed) + " GZip)" : "")
Severity: Major
Found in performance/yslow.js and 1 other location - About 1 hr to fix
performance/yslow.js on lines 2713..2713

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

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

                } else if ( isHttpEquiv ) {
                    if ( getHttpEquiv === "" || getHttpEquiv === null ) {
                        errDesc = 'Please fill the http-equiv attribute on meta tag.';
                        pushErrMsg(errDesc);
                    } else if ( getHttpEquiv !== "content-type" ) {
Severity: Major
Found in seo/seoChecker.js and 1 other location - About 1 hr to fix
seo/seoChecker.js on lines 186..204

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

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

                        r = function(v, t) {
                            var w;
                            q.status = t.status;
                            q.headers = {};
                            q.raw_headers = "";
Severity: Minor
Found in performance/yslow.js - About 1 hr to fix

    Function filterResult has 41 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                        filterResult: function(z, q) {
                            var v, u, r, w, s, x, t, y = this.getButtonView("ysPerfButton");
                            if (q === "all") {
                                u = true
                            }
    Severity: Minor
    Found in performance/yslow.js - About 1 hr to fix

      Function onclickTabLabel has 41 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                          onclickTabLabel: function(q, w) {
                              var s, r, t, y, A, z, v, B = YSLOW.util.getCurrentTarget(q),
                                  x = B.parentNode,
                                  u = x.nextSibling;
                              if (B.className.indexOf("selected") !== -1 || B.id.indexOf("label") === -1) {
      Severity: Minor
      Found in performance/yslow.js - About 1 hr to fix

        Function findStyleSheets has 41 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                            findStyleSheets: function(t, q) {
                                var A, r, u, y, z = t.getElementsByTagName("head")[0],
                                    w = t.getElementsByTagName("body")[0],
                                    s = [],
                                    x = this,
        Severity: Minor
        Found in performance/yslow.js - About 1 hr to fix

          Function E has 41 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                                      B, E = function(M) {
                                          var N, O = (s.format || "").toLowerCase(),
                                              P = {
                                                  tap: {
                                                      func: J.formatAsTAP,
          Severity: Minor
          Found in performance/yslow.js - About 1 hr to fix

            Function _labelNumCounter has 41 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    _labelNumCounter: function(par) {
                        if (par) {
                            var that = par.that;
                            var opt = that.opt;
                            var $el = that.$el;
            Severity: Minor
            Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js - About 1 hr to fix

              Function prettyAnchor has 40 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                                  prettyAnchor: function(y, r, t, s, w, q, z) {
                                      var u, x = "",
                                          v = "",
                                          A = 0;
                                      if (typeof r === "undefined") {
              Severity: Minor
              Found in performance/yslow.js - About 1 hr to fix

                Function sendBeacon has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                                    sendBeacon: function(v, u, r) {
                                        var w, z, A, s, x, t = "",
                                            y = YSLOW.util,
                                            B = y.Preference,
                                            q = "get";
                Severity: Minor
                Found in performance/yslow.js - About 1 hr to fix

                  Function stop has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      stop: function( type, clearQueue, gotoEnd ) {
                          var stopQueue = function( hooks ) {
                              var stop = hooks.stop;
                              delete hooks.stop;
                              stop( gotoEnd );
                  Severity: Minor
                  Found in _frontend/assets/js/vendor/jquery.min.js - About 1 hr to fix

                    Function on has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
                            var type, origFn;
                    
                            // Types can be a map of types/handlers
                            if ( typeof types === "object" ) {
                    Severity: Minor
                    Found in _frontend/assets/js/vendor/jquery.min.js - About 1 hr to fix

                      Function val has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          val: function( value ) {
                              var hooks, ret, isFunction,
                                  elem = this[0];
                      
                              if ( !arguments.length ) {
                      Severity: Minor
                      Found in _frontend/assets/js/vendor/jquery.min.js - About 1 hr to fix

                        Function extend has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        jQuery.extend = jQuery.fn.extend = function() {
                            var src, copyIsArray, copy, name, options, clone,
                                target = arguments[0] || {},
                                i = 1,
                                length = arguments.length,
                        Severity: Minor
                        Found in _frontend/assets/js/vendor/jquery.min.js - About 1 hr to fix

                          Function stop has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              stop: function( type, clearQueue, gotoEnd ) {
                                  var stopQueue = function( hooks ) {
                                      var stop = hooks.stop;
                                      delete hooks.stop;
                                      stop( gotoEnd );
                          Severity: Minor
                          Found in _frontend/dev/js/vendor/jquery.js - About 1 hr to fix

                            Function on has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
                                    var type, origFn;
                            
                                    // Types can be a map of types/handlers
                                    if ( typeof types === "object" ) {
                            Severity: Minor
                            Found in _frontend/dev/js/vendor/jquery.js - About 1 hr to fix
                              Severity
                              Category
                              Status
                              Source
                              Language