suitmedia/suitcoda

View on GitHub

Showing 784 of 784 total issues

Function fix has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    fix: function( event ) {
        if ( event[ jQuery.expando ] ) {
            return event;
        }

Severity: Minor
Found in _frontend/assets/js/vendor/jquery.min.js - About 1 hr to fix

    Function finish has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        finish: function( type ) {
            if ( type !== false ) {
                type = type || "fx";
            }
            return this.each(function() {
    Severity: Minor
    Found in _frontend/assets/js/vendor/jquery.min.js - About 1 hr to fix

      Function finish has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          finish: function( type ) {
              if ( type !== false ) {
                  type = type || "fx";
              }
              return this.each(function() {
      Severity: Minor
      Found in _frontend/dev/js/vendor/jquery.js - About 1 hr to fix

        Function drawGraph has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                        function drawGraph ( graph, dataTitle, dataSeries, dataXAxis) {
                            var option = {
                                title: {
                                    text: dataTitle,
                                    align: 'center'
        Severity: Minor
        Found in _frontend/assets/js/main.min.js - About 1 hr to fix

          Function fix has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              fix: function( event ) {
                  if ( event[ jQuery.expando ] ) {
                      return event;
                  }
          
          
          Severity: Minor
          Found in _frontend/dev/js/vendor/jquery.js - About 1 hr to fix

            Function drawGraph has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                            function drawGraph ( graph, dataTitle, dataSeries, dataXAxis) {
                                var option = {
                                    title: {
                                        text: dataTitle,
                                        align: 'center'
            Severity: Minor
            Found in _frontend/dev/js/main.js - About 1 hr to fix

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

                                              for (F = 0; F < I.length; F += 1) {
                                                  if (I[F].id === "expand-all-text") {
                                                      x = I[F]
                                                  }
                                              }
              Severity: Major
              Found in performance/yslow.js and 2 other locations - About 1 hr to fix
              performance/yslow.js on lines 4361..4365
              performance/yslow.js on lines 5728..5732

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

              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 (s.length > 0) {
                                          for (q = 0; q < s.length; q += 1) {
                                              r += s[q].length
                                          }
                                      }
              Severity: Major
              Found in performance/yslow.js and 1 other location - About 1 hr to fix
              performance/yslow.js on lines 717..721

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

              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 (foreColor) {
                              var fColor = Plugin.prototype._getColorValue.apply(this, [foreColor]);
                              if (fColor) {
                                  bi_bar.css({'background-color':fColor});
                              }
              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 200..205

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

              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 (backColor) {
                              var bColor = Plugin.prototype._getColorValue.apply(this, [backColor]);
                              if (bColor) {
                                  bi_barHolder.css({'background-color':bColor});
                              }
              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 194..199

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

              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

                                          for (D = 0; D < r.length; D += 1) {
                                              if (r[D].className === "dialog-left-button") {
                                                  q = r[D]
                                              }
                                          }
              Severity: Major
              Found in performance/yslow.js and 2 other locations - About 1 hr to fix
              performance/yslow.js on lines 5703..5707
              performance/yslow.js on lines 5728..5732

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

              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

                                      for (r = 0; r < q.length; r += 1) {
                                          if (q[r].id === "expand-all-text") {
                                              u = q[r]
                                          }
                                      }
              Severity: Major
              Found in performance/yslow.js and 2 other locations - About 1 hr to fix
              performance/yslow.js on lines 4361..4365
              performance/yslow.js on lines 5703..5707

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

              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 (s.length > 0) {
                                          for (q = 0; q < s.length; q += 1) {
                                              r += s[q].length
                                          }
                                      }
              Severity: Major
              Found in performance/yslow.js and 1 other location - About 1 hr to fix
              performance/yslow.js on lines 705..709

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

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

                  public function doRequest($url, $try = null)
                  {
                      if (is_null($try)) {
                          $try = $this->retry;
                      }
              Severity: Minor
              Found in app/Supports/CrawlerUrl.php - About 1 hr 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 handle has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function handle()
                  {
                      $unhandledJob = $this->job->getUnhandledJob()->first();
                      if ($unhandledJob) {
                          $this->updateJob($unhandledJob, 1);
              Severity: Minor
              Found in app/Console/Commands/WorkerCommand.php - About 1 hr 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 reportcardView has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                                  reportcardView: function(w) {
                                      var t, r, y, u = w.getOverallScore(),
                                          s = YSLOW.util.prettyScore(u),
                                          x = w.getRulesetApplied(),
                                          v = w.getResults(),
              Severity: Minor
              Found in performance/yslow.js - About 1 hr to fix

                Function plotOne has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                                    plotOne: function(A, t, z, y) {
                                        var s, u, C, r, x, q, w, D, v, B = A.getElementsByTagName("canvas");
                                        for (u = 0; u < B.length; u += 1) {
                                            if (B[u].id === y) {
                                                s = B[u]
                Severity: Minor
                Found in performance/yslow.js - About 1 hr to fix

                  Function findFlash has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                                      findFlash: function(u) {
                                          var s, t, r, q, v = [];
                                          YSLOW.util.event.fire("peelProgress", {
                                              total_step: 7,
                                              current_step: 4,
                  Severity: Minor
                  Found in performance/yslow.js - About 1 hr to fix

                    Function prettyScore has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                        prettyScore: function(r) {
                                            var q = "F";
                                            if (!parseInt(r, 10) && r !== 0) {
                                                return r
                                            }
                    Severity: Minor
                    Found in performance/yslow.js - About 1 hr to fix

                      Function getComponentType has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                          getComponentType: function(q) {
                                              var r = "unknown";
                                              if (q && typeof q === "string") {
                                                  if (q === "text/html" || q === "text/plain") {
                                                      r = "doc"
                      Severity: Minor
                      Found in performance/yslow.js - About 1 hr to fix
                        Severity
                        Category
                        Status
                        Source
                        Language