ninoseki/SimpleWhatWeb

View on GitHub

Showing 506 of 506 total issues

Method aggressive has 1504 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def aggressive(target)
    m = []

    # the paths are relative to the url path if they don't start with /
    # this path, with this md5 = this version
Severity: Major
Found in lib/whatweb/plugins/drupal.rb - About 1 wk to fix

    File drupal.rb has 1525 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    WhatWeb::Plugin.define "Drupal" do
      @author = "Andrew Horton"
      @version = "0.3"
      @description = "Drupal is an opensource CMS written in PHP."
      @website = "http://www.drupal.org"
    Severity: Major
    Found in lib/whatweb/plugins/drupal.rb - About 4 days to fix

      Method aggressive has 718 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        def aggressive(target)
          m = []
      
          # the paths are relative to the url path if they don't start with /
          # this path, with this md5 = this version
      Severity: Major
      Found in lib/whatweb/plugins/wordpress.rb - About 3 days to fix

        Method passive has a Cognitive Complexity of 95 (exceeds 5 allowed). Consider refactoring.
        Open

          def passive(target)
            m = []
        
            unless target.headers["server"].nil?
        
        
        Severity: Minor
        Found in lib/whatweb/plugins/http-server.rb - About 1 day 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

        File wordpress.rb has 757 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        WhatWeb::Plugin.define "WordPress" do
          @author = "Andrew Horton"
          @version = "0.5"
          @description = "WordPress is an opensource blogging system commonly used as a CMS."
          @website = "http://www.wordpress.org/"
        Severity: Major
        Found in lib/whatweb/plugins/wordpress.rb - About 1 day to fix

          Method aggressive has 287 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            def aggressive(target)
              m = []
          
              versions = Hash["1.0.0" =>
                              [["mambots/editors/tinymce.xml",
          Severity: Major
          Found in lib/whatweb/plugins/joomla.rb - About 1 day to fix

            Method aggressive has 187 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              def aggressive(target)
                m = []
            
                versions = Hash[
                                "2.0.3" =>
            Severity: Major
            Found in lib/whatweb/plugins/modx-cms.rb - About 7 hrs to fix

              Method aggressive has 172 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                def aggressive(target)
                  m = []
                  versions = Hash[
                      "05.06.04" => [
                        ["Portals/_default/default.css", "621653870c35f7eb431b9679b39155ee"],
              Severity: Major
              Found in lib/whatweb/plugins/dotnetnuke.rb - About 6 hrs to fix

                Method passive has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
                Open

                  def passive(target)
                    m = []
                
                    # Excel
                    if target.body =~ /<DocumentProperties xmlns="urn:schemas-microsoft-com:office:[excel|office]?">/ || target.body =~ /<?mso-application progid="Excel.Sheet"?>/
                Severity: Minor
                Found in lib/whatweb/plugins/microsoft-office-xml.rb - About 6 hrs 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

                Method aggressive has 158 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  def aggressive(target)
                    m = []
                
                    versions = Hash[
                                    "1.4.1" =>
                Severity: Major
                Found in lib/whatweb/plugins/centreon.rb - About 6 hrs to fix

                  Method passive has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring.
                  Open

                    def passive(target)
                      m = []
                  
                      # Check if the document is a valid phpinfo() file
                      if target.body =~ /<title>phpinfo\(\)<\/title>/ && (target.body =~ /<h1 class="p">PHP Version [^<]{3,40}<\/h1>/ || target.body =~ /<h1>PHP Version [^<]{3,40}<\/h1>/)
                  Severity: Minor
                  Found in lib/whatweb/plugins/phpinfo.rb - About 6 hrs 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

                  Method passive has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
                  Open

                    def passive(target)
                      m = []
                  
                      # /cgi-bin/authLogin.cgi # Check document is QNAP XML
                      if (target.uri.path == "/cgi-bin/authLogin.cgi") && target.body =~ /^<QDocRoot version="[\d\.]+">$/
                  Severity: Minor
                  Found in lib/whatweb/plugins/qnap-nas.rb - About 5 hrs 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

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

                    def aggressive(target)
                      m = []
                  
                      # the paths are relative to the url path if they don't start with /
                      # this path, with this md5 = this version
                  Severity: Major
                  Found in lib/whatweb/plugins/serendipity.rb and 1 other location - About 5 hrs to fix
                  lib/whatweb/plugins/smf.rb on lines 50..99

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

                  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

                    def aggressive(target)
                      m = []
                  
                      # the paths are relative to the url path if they don't start with /
                      # this path, with this md5 = this version
                  Severity: Major
                  Found in lib/whatweb/plugins/smf.rb and 1 other location - About 5 hrs to fix
                  lib/whatweb/plugins/serendipity.rb on lines 82..131

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

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

                    def aggressive(target)
                      m = []
                      versions = Hash[
                          "2.4.10" => [
                            ["cms/css/layout.css", "5db089786a6d5487e16297ce36ab2421"],
                  Severity: Major
                  Found in lib/whatweb/plugins/silverstripe.rb - About 5 hrs to fix

                    Method aggressive has 122 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      def aggressive(target)
                        m = []
                    
                        # the paths are relative to the url path if they don't start with /
                        # this path, with this md5 = this version
                    Severity: Major
                    Found in lib/whatweb/plugins/phpmyadmin.rb - About 4 hrs to fix

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

                          files = [
                            { version: '1.0', path: "docs/install.html", md5: 'd2748bb3397ec0de230ed0b6f460d307' },
                            { version: '1.0.1',  path: "docs/install.html", md5: '578fa4261a4a8bb35389d07c112b924b' },
                            { version: '1.2',    path: "docs/install.html", md5: 'd5eda4db7271483b563213747a7fcd65' },
                            { version: '1.2.1',  path: "docs/install.html", md5: 'e39950020c0102948ceccdd30e01f8d3' },
                      Severity: Major
                      Found in lib/whatweb/plugins/punbb.rb and 1 other location - About 4 hrs to fix
                      lib/whatweb/plugins/contao.rb on lines 37..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 163.

                      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

                          files = [
                      
                            { md5: '0469d85ecb18e9a1ede2b0b2d5aa79a9', version: '2.9.0 (2010-07-02)', path: 'CHANGELOG.md' },
                            { md5: '24fb115dd0722792961d04b62353954c', version: '2.9.1 (2010-08-09)', path: 'CHANGELOG.md' },
                            { md5: '0da80d24450b841298c7ce3cac558e67', version: '2.9.2 (2010-12-02)', path: 'CHANGELOG.md' },
                      Severity: Major
                      Found in lib/whatweb/plugins/contao.rb and 1 other location - About 4 hrs to fix
                      lib/whatweb/plugins/punbb.rb on lines 49..75

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

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

                        def passive(target)
                          m = []
                      
                          device = {};
                          device[:model] = []
                      Severity: Minor
                      Found in lib/whatweb/plugins/moxa-nport-device.rb - About 4 hrs 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

                      Method passive has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
                      Open

                        def passive(target)
                          m = []
                          hup = {}; hup[:host] = []; hup[:user] = []; hup[:pass] = []
                      
                          stuff = {
                      Severity: Minor
                      Found in lib/whatweb/plugins/mysql_connect.rb - About 3 hrs 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