suitmedia/suitcoda

View on GitHub

Showing 784 of 784 total issues

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

    if ( program.facebookinsight ) {
        var fbinsight   = require('./fbinsight.js');
        var fbCheck     = fbinsight.check(url);
        var fbCount     = fbinsight.count();
        resultSocmed.checking.push(fbCheck);
Severity: Major
Found in socmed/socmedChecker.js and 2 other locations - About 1 hr to fix
socmed/socmedChecker.js on lines 39..45
socmed/socmedChecker.js on lines 57..63

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

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

                    addRuleInfo: function(s, q, r) {
                        if (typeof s === "string" && typeof q === "string" && typeof r === "string") {
                            this.rules[s] = {
                                name: q,
                                info: r
Severity: Major
Found in performance/yslow.js and 1 other location - About 1 hr to fix
performance/yslow.js on lines 2516..2523

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

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

                    addToolInfo: function(s, q, r) {
                        if (typeof s === "string" && typeof q === "string" && typeof r === "string") {
                            this.tools[s] = {
                                name: q,
                                info: r
Severity: Major
Found in performance/yslow.js and 1 other location - About 1 hr to fix
performance/yslow.js on lines 2508..2515

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

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

tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
    var matched, match, tokens, type,
        soFar, groups, preFilters,
        cached = tokenCache[ selector + " " ];

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

    Function matcherFromTokens has 46 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function matcherFromTokens( tokens ) {
        var checkContext, matcher, j,
            len = tokens.length,
            leadingRelative = Expr.relative[ tokens[0].type ],
            implicitRelative = leadingRelative || Expr.relative[" "],
    Severity: Minor
    Found in _frontend/assets/js/vendor/jquery.min.js - About 1 hr to fix

      Function tokenize has 46 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
          var matched, match, tokens, type,
              soFar, groups, preFilters,
              cached = tokenCache[ selector + " " ];
      
      
      Severity: Minor
      Found in _frontend/dev/js/vendor/jquery.js - About 1 hr to fix

        Function matcherFromTokens has 46 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function matcherFromTokens( tokens ) {
            var checkContext, matcher, j,
                len = tokens.length,
                leadingRelative = Expr.relative[ tokens[0].type ],
                implicitRelative = leadingRelative || Expr.relative[" "],
        Severity: Minor
        Found in _frontend/dev/js/vendor/jquery.js - About 1 hr to fix

          Method testHandleWithEmptyDatabase has 46 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function testHandleWithEmptyDatabase()
              {
                  $project = Mockery::mock(Project::class)->makePartial();
                  $inspection = Mockery::mock(Inspection::class)->makePartial();
                  $crawler = Mockery::mock(CrawlerUrl::class)->shouldIgnoreMissing();
          Severity: Minor
          Found in tests/Listeners/CrawlerTheWebsiteTest.php - About 1 hr to fix

            Function parse has 45 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                sprintf.parse = function(fmt) {
                    var _fmt = fmt, match = [], parse_tree = [], arg_names = 0
                    while (_fmt) {
                        if ((match = re.text.exec(_fmt)) !== null) {
                            parse_tree[parse_tree.length] = match[0]
            Severity: Minor
            Found in _frontend/assets/js/vendor/sprintf.min.js - About 1 hr to fix

              Function parse has 45 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  sprintf.parse = function(fmt) {
                      var _fmt = fmt, match = [], parse_tree = [], arg_names = 0
                      while (_fmt) {
                          if ((match = re.text.exec(_fmt)) !== null) {
                              parse_tree[parse_tree.length] = match[0]
              Severity: Minor
              Found in _frontend/dev/js/vendor/sprintf.js - About 1 hr to fix

                Method run has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function run()
                    {
                        $seoCheckingList = [
                            'Title Tag Checking' => '--title',
                            'Header Tag Checking' => '--header',
                Severity: Minor
                Found in database/seeds/SubScopeTableSeeder.php - About 1 hr to fix

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

                          if ( isLang ) {
                              var getLang = horseman.attribute('html','lang');
                              if ( getLang === "" ) {
                                  errDesc = 'Please fill the Lang attribute to keep the standarization.';
                                  pushErrMsg(errDesc);
                  Severity: Major
                  Found in seo/seoChecker.js and 1 other location - About 1 hr to fix
                  seo/seoChecker.js on lines 231..241

                  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

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

                          if ( isMetaVp ) {
                              var getMetaVp = horseman.attribute('meta[name="viewport"]', 'content');
                              if ( getMetaVp === "" ) {
                                  errDesc = "Meta Viewport tag must be filled";
                                  pushErrMsg(errDesc);
                  Severity: Major
                  Found in seo/seoChecker.js and 1 other location - About 1 hr to fix
                  seo/seoChecker.js on lines 160..170

                  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

                  Function formatAsTAP has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                                      formatAsTAP: function(t) {
                                          var u, z, B, x, s, r, q = 0,
                                              w = t.length,
                                              y = [],
                                              v = YSLOW.util,
                  Severity: Minor
                  Found in performance/yslow.js - About 1 hr to fix

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

                                            if (t > 0) {
                                                w -= t * q.points_cssimages;
                                                s[s.length] = "This page has " + YSLOW.util.plural("%num% external background image%s%", (t + q.max_cssimages)) + ".  Try combining them with CSS sprites."
                                            }
                    Severity: Major
                    Found in performance/yslow.js and 2 other locations - About 1 hr to fix
                    performance/yslow.js on lines 2592..2595
                    performance/yslow.js on lines 2596..2599

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

                    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

                                            if (u > 0) {
                                                w -= u * q.points_js;
                                                s[s.length] = "This page has " + YSLOW.util.plural("%num% external Javascript script%s%", (u + q.max_js)) + ".  Try combining them into one."
                                            }
                    Severity: Major
                    Found in performance/yslow.js and 2 other locations - About 1 hr to fix
                    performance/yslow.js on lines 2596..2599
                    performance/yslow.js on lines 2600..2603

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

                    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

                                            if (r > 0) {
                                                w -= r * q.points_css;
                                                s[s.length] = "This page has " + YSLOW.util.plural("%num% external stylesheet%s%", (r + q.max_css)) + ".  Try combining them into one."
                                            }
                    Severity: Major
                    Found in performance/yslow.js and 2 other locations - About 1 hr to fix
                    performance/yslow.js on lines 2592..2595
                    performance/yslow.js on lines 2600..2603

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

                    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

                    Method testEncodingUrl has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function testEncodingUrl()
                        {
                            $client = $this->getMockClient()->makePartial();
                            $domCrawler = $this->getMockDomCrawler()->makePartial();
                            
                    Severity: Minor
                    Found in tests/Supports/CrawlerUrlTest.php - About 1 hr to fix

                      Consider simplifying this complex logical expression.
                      Open

                                  if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
                                      ( support.htmlSerialize || !rnoshimcache.test( value )  ) &&
                                      ( support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
                                      !wrapMap[ (rtagName.exec( value ) || [ "", "" ])[ 1 ].toLowerCase() ] ) {
                      
                      
                      Severity: Critical
                      Found in _frontend/assets/js/vendor/jquery.min.js - About 1 hr to fix

                        Consider simplifying this complex logical expression.
                        Open

                                    if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
                                        ( support.htmlSerialize || !rnoshimcache.test( value )  ) &&
                                        ( support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
                                        !wrapMap[ (rtagName.exec( value ) || [ "", "" ])[ 1 ].toLowerCase() ] ) {
                        
                        
                        Severity: Critical
                        Found in _frontend/dev/js/vendor/jquery.js - About 1 hr to fix
                          Severity
                          Category
                          Status
                          Source
                          Language