tristanlatr/WPWatcher

View on GitHub
wpwatcher/email.py

Summary

Maintainability
B
5 hrs
Test Coverage

File email.py has 321 lines of code (exceeds 250 allowed). Consider refactoring.
Open

"""
Email notifications.
"""
from typing import Dict, Any, List, Optional
import io
Severity: Minor
Found in wpwatcher/email.py - About 3 hrs to fix

    Cyclomatic complexity is too high in method should_notify. (14)
    Open

        def should_notify(
            self, wp_report: Dict[str, Any], last_wp_report: Optional[Dict[str, Any]]
        ) -> bool:
            """Determine if the notification should be sent"""
            should = True
    Severity: Minor
    Found in wpwatcher/email.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in method send_report. (6)
    Open

        def send_report(
            self, wp_site: Dict[str, Any], wp_report: Dict[str, Any], wpscan_command: str, wpscan_version:str
        ) -> bool:
            """Sending the report"""
            # Send the report to
    Severity: Minor
    Found in wpwatcher/email.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Function should_notify has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

        def should_notify(
            self, wp_report: Dict[str, Any], last_wp_report: Optional[Dict[str, Any]]
        ) -> bool:
            """Determine if the notification should be sent"""
            should = True
    Severity: Minor
    Found in wpwatcher/email.py - 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 notify has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def notify(
    Severity: Minor
    Found in wpwatcher/email.py - About 35 mins to fix

      Missing whitespace after ':'
      Open

              wpscan_command: str, wpscan_version:str,
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Each comma, semicolon or colon should be followed by whitespace.

      Okay: [a, b]
      Okay: (3,)
      Okay: a[1:4]
      Okay: a[:4]
      Okay: a[1:]
      Okay: a[1:4:2]
      E231: ['a','b']
      E231: foo(bar,baz)
      E231: [{'a':'b'}]

      Line too long (200 > 79 characters)
      Open

                      f"Not sending WPWatcher ERROR email report for site {wp_report['site']} because send_errors=No. If you want to receive error emails, set send_errors=Yes in the config or use --errors."
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Limit all lines to a maximum of 79 characters.

      There are still many devices around that are limited to 80 character
      lines; plus, limiting windows to 80 characters makes it possible to
      have several windows side-by-side.  The default wrapping on such
      devices looks ugly.  Therefore, please limit all lines to a maximum
      of 79 characters. For flowing long blocks of text (docstrings or
      comments), limiting the length to 72 characters is recommended.
      
      Reports error E501.

      Missing whitespace after ':'
      Open

          def build_message(wp_report: Dict[str, Any], wpscan_command: str, wpscan_version:str) -> str:
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Each comma, semicolon or colon should be followed by whitespace.

      Okay: [a, b]
      Okay: (3,)
      Okay: a[1:4]
      Okay: a[:4]
      Okay: a[1:]
      Okay: a[1:4:2]
      E231: ['a','b']
      E231: foo(bar,baz)
      E231: [{'a':'b'}]

      Line too long (129 > 79 characters)
      Open

                <div class="content" style="box-sizing: border-box; display: block; Margin: 0 auto; max-width: 1000px; padding: 10px;">
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Limit all lines to a maximum of 79 characters.

      There are still many devices around that are limited to 80 character
      lines; plus, limiting windows to 80 characters makes it possible to
      have several windows side-by-side.  The default wrapping on such
      devices looks ugly.  Therefore, please limit all lines to a maximum
      of 79 characters. For flowing long blocks of text (docstrings or
      comments), limiting the length to 72 characters is recommended.
      
      Reports error E501.

      Missing whitespace after ':'
      Open

              self, wp_report: Dict[str, Any], email_to: List[str], wpscan_command: str, wpscan_version:str
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Each comma, semicolon or colon should be followed by whitespace.

      Okay: [a, b]
      Okay: (3,)
      Okay: a[1:4]
      Okay: a[:4]
      Okay: a[1:]
      Okay: a[1:4:2]
      E231: ['a','b']
      E231: foo(bar,baz)
      E231: [{'a':'b'}]

      Line too long (87 > 79 characters)
      Open

                      f'<font face="Courier New, Courier, monospace" size="-1">{body}</font>'
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Limit all lines to a maximum of 79 characters.

      There are still many devices around that are limited to 80 character
      lines; plus, limiting windows to 80 characters makes it possible to
      have several windows side-by-side.  The default wrapping on such
      devices looks ugly.  Therefore, please limit all lines to a maximum
      of 79 characters. For flowing long blocks of text (docstrings or
      comments), limiting the length to 72 characters is recommended.
      
      Reports error E501.

      Line too long (196 > 79 characters)
      Open

                      f"Not sending WPWatcher INFO email report for site {wp_report['site']} because send_infos=No. If you want to receive infos emails, set send_infos=Yes in the config or use --infos."
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Limit all lines to a maximum of 79 characters.

      There are still many devices around that are limited to 80 character
      lines; plus, limiting windows to 80 characters makes it possible to
      have several windows side-by-side.  The default wrapping on such
      devices looks ugly.  Therefore, please limit all lines to a maximum
      of 79 characters. For flowing long blocks of text (docstrings or
      comments), limiting the length to 72 characters is recommended.
      
      Reports error E501.

      Line too long (104 > 79 characters)
      Open

                  <div class="footer" style="clear: both; Margin-top: 10px; text-align: center; width: 100%;">
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Limit all lines to a maximum of 79 characters.

      There are still many devices around that are limited to 80 character
      lines; plus, limiting windows to 80 characters makes it possible to
      have several windows side-by-side.  The default wrapping on such
      devices looks ugly.  Therefore, please limit all lines to a maximum
      of 79 characters. For flowing long blocks of text (docstrings or
      comments), limiting the length to 72 characters is recommended.
      
      Reports error E501.

      Line too long (232 > 79 characters)
      Open

        <body class="" style="background-color: #f6f6f6; font-family: sans-serif; -webkit-font-smoothing: antialiased; font-size: 14px; line-height: 1.4; margin: 0; padding: 0; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;">
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Limit all lines to a maximum of 79 characters.

      There are still many devices around that are limited to 80 character
      lines; plus, limiting windows to 80 characters makes it possible to
      have several windows side-by-side.  The default wrapping on such
      devices looks ugly.  Therefore, please limit all lines to a maximum
      of 79 characters. For flowing long blocks of text (docstrings or
      comments), limiting the length to 72 characters is recommended.
      
      Reports error E501.

      Line too long (97 > 79 characters)
      Open

                            <td style="font-family: sans-serif; font-size: 14px; vertical-align: top;">
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Limit all lines to a maximum of 79 characters.

      There are still many devices around that are limited to 80 character
      lines; plus, limiting windows to 80 characters makes it possible to
      have several windows side-by-side.  The default wrapping on such
      devices looks ugly.  Therefore, please limit all lines to a maximum
      of 79 characters. For flowing long blocks of text (docstrings or
      comments), limiting the length to 72 characters is recommended.
      
      Reports error E501.

      Line too long (80 > 79 characters)
      Open

                  self.send_report(wp_site, wp_report, wpscan_command, wpscan_version)
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Limit all lines to a maximum of 79 characters.

      There are still many devices around that are limited to 80 character
      lines; plus, limiting windows to 80 characters makes it possible to
      have several windows side-by-side.  The default wrapping on such
      devices looks ugly.  Therefore, please limit all lines to a maximum
      of 79 characters. For flowing long blocks of text (docstrings or
      comments), limiting the length to 72 characters is recommended.
      
      Reports error E501.

      Line too long (209 > 79 characters)
      Open

                      f"Not sending WPWatcher {wp_report['status']} email report for site {wp_report['site']}. To receive emails, setup mail server settings in the config and enable send_email_report or use --send."
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Limit all lines to a maximum of 79 characters.

      There are still many devices around that are limited to 80 character
      lines; plus, limiting windows to 80 characters makes it possible to
      have several windows side-by-side.  The default wrapping on such
      devices looks ugly.  Therefore, please limit all lines to a maximum
      of 79 characters. For flowing long blocks of text (docstrings or
      comments), limiting the length to 72 characters is recommended.
      
      Reports error E501.

      Line too long (207 > 79 characters)
      Open

                      f"Not sending WPWatcher WARNING email report for site {wp_report['site']} because send_warnings=No. If you want to receive warning emails, set send_warnings=Yes in the config or use --infos."
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Limit all lines to a maximum of 79 characters.

      There are still many devices around that are limited to 80 character
      lines; plus, limiting windows to 80 characters makes it possible to
      have several windows side-by-side.  The default wrapping on such
      devices looks ugly.  Therefore, please limit all lines to a maximum
      of 79 characters. For flowing long blocks of text (docstrings or
      comments), limiting the length to 72 characters is recommended.
      
      Reports error E501.

      Indentation is not a multiple of 4
      Open

                if (
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Use indent_size (PEP8 says 4) spaces per indentation level.

      For really old code that you don't want to mess up, you can continue
      to use 8-space tabs.
      
      Okay: a = 1
      Okay: if a == 0:\n    a = 1
      E111:   a = 1
      E114:   # a = 1
      
      Okay: for item in items:\n    pass
      E112: for item in items:\npass
      E115: for item in items:\n# Hi\n    pass
      
      Okay: a = 1\nb = 2
      E113: a = 1\n    b = 2
      E116: a = 1\n    # b = 2

      Line too long (135 > 79 characters)
      Open

                      f"Not sending WPWatcher {wp_report['status']} email report because no email is configured for site {wp_report['site']}"
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Limit all lines to a maximum of 79 characters.

      There are still many devices around that are limited to 80 character
      lines; plus, limiting windows to 80 characters makes it possible to
      have several windows side-by-side.  The default wrapping on such
      devices looks ugly.  Therefore, please limit all lines to a maximum
      of 79 characters. For flowing long blocks of text (docstrings or
      comments), limiting the length to 72 characters is recommended.
      
      Reports error E501.

      Line too long (97 > 79 characters)
      Open

          def build_message(wp_report: Dict[str, Any], wpscan_command: str, wpscan_version:str) -> str:
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Limit all lines to a maximum of 79 characters.

      There are still many devices around that are limited to 80 character
      lines; plus, limiting windows to 80 characters makes it possible to
      have several windows side-by-side.  The default wrapping on such
      devices looks ugly.  Therefore, please limit all lines to a maximum
      of 79 characters. For flowing long blocks of text (docstrings or
      comments), limiting the length to 72 characters is recommended.
      
      Reports error E501.

      Indentation is not a multiple of 4
      Open

                    log.info(
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Use indent_size (PEP8 says 4) spaces per indentation level.

      For really old code that you don't want to mess up, you can continue
      to use 8-space tabs.
      
      Okay: a = 1
      Okay: if a == 0:\n    a = 1
      E111:   a = 1
      E114:   # a = 1
      
      Okay: for item in items:\n    pass
      E112: for item in items:\npass
      E115: for item in items:\n# Hi\n    pass
      
      Okay: a = 1\nb = 2
      E113: a = 1\n    b = 2
      E116: a = 1\n    # b = 2

      Line too long (146 > 79 characters)
      Open

                      <td class="wrapper" style="font-family: sans-serif; font-size: 14px; vertical-align: top; box-sizing: border-box; padding: 20px;">
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Limit all lines to a maximum of 79 characters.

      There are still many devices around that are limited to 80 character
      lines; plus, limiting windows to 80 characters makes it possible to
      have several windows side-by-side.  The default wrapping on such
      devices looks ugly.  Therefore, please limit all lines to a maximum
      of 79 characters. For flowing long blocks of text (docstrings or
      comments), limiting the length to 72 characters is recommended.
      
      Reports error E501.

      Indentation is not a multiple of 4
      Open

                    should = False
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Use indent_size (PEP8 says 4) spaces per indentation level.

      For really old code that you don't want to mess up, you can continue
      to use 8-space tabs.
      
      Okay: a = 1
      Okay: if a == 0:\n    a = 1
      E111:   a = 1
      E114:   # a = 1
      
      Okay: for item in items:\n    pass
      E112: for item in items:\npass
      E115: for item in items:\n# Hi\n    pass
      
      Okay: a = 1\nb = 2
      E113: a = 1\n    b = 2
      E116: a = 1\n    # b = 2

      Line too long (188 > 79 characters)
      Open

          <table border="0" cellpadding="0" cellspacing="0" class="body" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%; background-color: #f6f6f6;">
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Limit all lines to a maximum of 79 characters.

      There are still many devices around that are limited to 80 character
      lines; plus, limiting windows to 80 characters makes it possible to
      have several windows side-by-side.  The default wrapping on such
      devices looks ugly.  Therefore, please limit all lines to a maximum
      of 79 characters. For flowing long blocks of text (docstrings or
      comments), limiting the length to 72 characters is recommended.
      
      Reports error E501.

      Line too long (86 > 79 characters)
      Open

                  f"<p>WordPress security scan report for site: {wp_report['site']}<br />\n"
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Limit all lines to a maximum of 79 characters.

      There are still many devices around that are limited to 80 character
      lines; plus, limiting windows to 80 characters makes it possible to
      have several windows side-by-side.  The default wrapping on such
      devices looks ugly.  Therefore, please limit all lines to a maximum
      of 79 characters. For flowing long blocks of text (docstrings or
      comments), limiting the length to 72 characters is recommended.
      
      Reports error E501.

      Continuation line unaligned for hanging indent
      Open

                      < self.resend_emails_after
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Continuation lines indentation.

      Continuation lines should align wrapped elements either vertically
      using Python's implicit line joining inside parentheses, brackets
      and braces, or using a hanging indent.
      
      When using a hanging indent these considerations should be applied:
      - there should be no arguments on the first line, and
      - further indentation should be used to clearly distinguish itself
        as a continuation line.
      
      Okay: a = (\n)
      E123: a = (\n    )
      
      Okay: a = (\n    42)
      E121: a = (\n   42)
      E122: a = (\n42)
      E123: a = (\n    42\n    )
      E124: a = (24,\n     42\n)
      E125: if (\n    b):\n    pass
      E126: a = (\n        42)
      E127: a = (24,\n      42)
      E128: a = (24,\n    42)
      E129: if (a or\n    b):\n    pass
      E131: a = (\n    42\n 24)

      Line too long (158 > 79 characters)
      Open

                    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;">
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Limit all lines to a maximum of 79 characters.

      There are still many devices around that are limited to 80 character
      lines; plus, limiting windows to 80 characters makes it possible to
      have several windows side-by-side.  The default wrapping on such
      devices looks ugly.  Therefore, please limit all lines to a maximum
      of 79 characters. For flowing long blocks of text (docstrings or
      comments), limiting the length to 72 characters is recommended.
      
      Reports error E501.

      Line too long (203 > 79 characters)
      Open

                        <td class="content-block powered-by" style="font-family: sans-serif; vertical-align: top; padding-bottom: 10px; padding-top: 10px; font-size: 12px; color: #999999; text-align: center;">
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Limit all lines to a maximum of 79 characters.

      There are still many devices around that are limited to 80 character
      lines; plus, limiting windows to 80 characters makes it possible to
      have several windows side-by-side.  The default wrapping on such
      devices looks ugly.  Therefore, please limit all lines to a maximum
      of 79 characters. For flowing long blocks of text (docstrings or
      comments), limiting the length to 72 characters is recommended.
      
      Reports error E501.

      Trailing whitespace
      Open

                          Automating WPscan to scan and report vulnerable Wordpress sites <br/> 
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Trailing whitespace is superfluous.

      The warning returned varies on whether the line itself is blank,
      for easier filtering for those who want to indent their blank lines.
      
      Okay: spam(1)\n#
      W291: spam(1) \n#
      W293: class Foo(object):\n    \n    bang = 12

      Blank line contains whitespace
      Open

              
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Trailing whitespace is superfluous.

      The warning returned varies on whether the line itself is blank,
      for easier filtering for those who want to indent their blank lines.
      
      Okay: spam(1)\n#
      W291: spam(1) \n#
      W293: class Foo(object):\n    \n    bang = 12

      Line too long (94 > 79 characters)
      Open

              <td style="font-family: sans-serif; font-size: 14px; vertical-align: top;">&nbsp;</td>
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Limit all lines to a maximum of 79 characters.

      There are still many devices around that are limited to 80 character
      lines; plus, limiting windows to 80 characters makes it possible to
      have several windows side-by-side.  The default wrapping on such
      devices looks ugly.  Therefore, please limit all lines to a maximum
      of 79 characters. For flowing long blocks of text (docstrings or
      comments), limiting the length to 72 characters is recommended.
      
      Reports error E501.

      Line too long (167 > 79 characters)
      Open

                  <table class="main" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%; background: #ffffff; border-radius: 3px;">
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Limit all lines to a maximum of 79 characters.

      There are still many devices around that are limited to 80 character
      lines; plus, limiting windows to 80 characters makes it possible to
      have several windows side-by-side.  The default wrapping on such
      devices looks ugly.  Therefore, please limit all lines to a maximum
      of 79 characters. For flowing long blocks of text (docstrings or
      comments), limiting the length to 72 characters is recommended.
      
      Reports error E501.

      Line too long (162 > 79 characters)
      Open

                        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;">
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Limit all lines to a maximum of 79 characters.

      There are still many devices around that are limited to 80 character
      lines; plus, limiting windows to 80 characters makes it possible to
      have several windows side-by-side.  The default wrapping on such
      devices looks ugly.  Therefore, please limit all lines to a maximum
      of 79 characters. For flowing long blocks of text (docstrings or
      comments), limiting the length to 72 characters is recommended.
      
      Reports error E501.

      Line too long (219 > 79 characters)
      Open

                          <a href="https://github.com/tristanlatr/WPWatcher" style="color: #999999; text-align: center; text-decoration: none;">WPWatcher version $wpwatcher_version </a> - WPScan version $wpscan_version <br />
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Limit all lines to a maximum of 79 characters.

      There are still many devices around that are limited to 80 character
      lines; plus, limiting windows to 80 characters makes it possible to
      have several windows side-by-side.  The default wrapping on such
      devices looks ugly.  Therefore, please limit all lines to a maximum
      of 79 characters. For flowing long blocks of text (docstrings or
      comments), limiting the length to 72 characters is recommended.
      
      Reports error E501.

      Continuation line unaligned for hanging indent
      Open

                      - datetime.strptime(last_wp_report["last_email"], DATE_FORMAT)
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Continuation lines indentation.

      Continuation lines should align wrapped elements either vertically
      using Python's implicit line joining inside parentheses, brackets
      and braces, or using a hanging indent.
      
      When using a hanging indent these considerations should be applied:
      - there should be no arguments on the first line, and
      - further indentation should be used to clearly distinguish itself
        as a continuation line.
      
      Okay: a = (\n)
      E123: a = (\n    )
      
      Okay: a = (\n    42)
      E121: a = (\n   42)
      E122: a = (\n42)
      E123: a = (\n    42\n    )
      E124: a = (24,\n     42\n)
      E125: if (\n    b):\n    pass
      E126: a = (\n        42)
      E127: a = (24,\n      42)
      E128: a = (24,\n    42)
      E129: if (a or\n    b):\n    pass
      E131: a = (\n    42\n 24)

      Line too long (105 > 79 characters)
      Open

              self, wp_site: Dict[str, Any], wp_report: Dict[str, Any], wpscan_command: str, wpscan_version:str
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Limit all lines to a maximum of 79 characters.

      There are still many devices around that are limited to 80 character
      lines; plus, limiting windows to 80 characters makes it possible to
      have several windows side-by-side.  The default wrapping on such
      devices looks ugly.  Therefore, please limit all lines to a maximum
      of 79 characters. For flowing long blocks of text (docstrings or
      comments), limiting the length to 72 characters is recommended.
      
      Reports error E501.

      Line too long (80 > 79 characters)
      Open

                  message += format_issues("Fixed", wp_report["fixed"], format="html")
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Limit all lines to a maximum of 79 characters.

      There are still many devices around that are limited to 80 character
      lines; plus, limiting windows to 80 characters makes it possible to
      have several windows side-by-side.  The default wrapping on such
      devices looks ugly.  Therefore, please limit all lines to a maximum
      of 79 characters. For flowing long blocks of text (docstrings or
      comments), limiting the length to 72 characters is recommended.
      
      Reports error E501.

      Line too long (167 > 79 characters)
      Open

                        f"Not sending WPWatcher {wp_report['status']} email report for site {wp_report['site']} because already sent in the last {self.resend_emails_after}."
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Limit all lines to a maximum of 79 characters.

      There are still many devices around that are limited to 80 character
      lines; plus, limiting windows to 80 characters makes it possible to
      have several windows side-by-side.  The default wrapping on such
      devices looks ugly.  Therefore, please limit all lines to a maximum
      of 79 characters. For flowing long blocks of text (docstrings or
      comments), limiting the length to 72 characters is recommended.
      
      Reports error E501.

      Line too long (101 > 79 characters)
      Open

              ] = f"WPWatcher {wp_report['status']} report - {wp_report['site']} - {wp_report['datetime']}"
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Limit all lines to a maximum of 79 characters.

      There are still many devices around that are limited to 80 character
      lines; plus, limiting windows to 80 characters makes it possible to
      have several windows side-by-side.  The default wrapping on such
      devices looks ugly.  Therefore, please limit all lines to a maximum
      of 79 characters. For flowing long blocks of text (docstrings or
      comments), limiting the length to 72 characters is recommended.
      
      Reports error E501.

      Missing whitespace after ':'
      Open

              self, wp_site: Dict[str, Any], wp_report: Dict[str, Any], wpscan_command: str, wpscan_version:str
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Each comma, semicolon or colon should be followed by whitespace.

      Okay: [a, b]
      Okay: (3,)
      Okay: a[1:4]
      Okay: a[:4]
      Okay: a[1:]
      Okay: a[1:4:2]
      E231: ['a','b']
      E231: foo(bar,baz)
      E231: [{'a':'b'}]

      Line too long (180 > 79 characters)
      Open

              <td class="container" style="font-family: sans-serif; font-size: 14px; vertical-align: top; display: block; Margin: 0 auto; max-width: 800px; padding: 10px; width: 800px;">
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Limit all lines to a maximum of 79 characters.

      There are still many devices around that are limited to 80 character
      lines; plus, limiting windows to 80 characters makes it possible to
      have several windows side-by-side.  The default wrapping on such
      devices looks ugly.  Therefore, please limit all lines to a maximum
      of 79 characters. For flowing long blocks of text (docstrings or
      comments), limiting the length to 72 characters is recommended.
      
      Reports error E501.

      Line too long (203 > 79 characters)
      Open

                        <td class="content-block powered-by" style="font-family: sans-serif; vertical-align: top; padding-bottom: 10px; padding-top: 10px; font-size: 12px; color: #999999; text-align: center;">
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Limit all lines to a maximum of 79 characters.

      There are still many devices around that are limited to 80 character
      lines; plus, limiting windows to 80 characters makes it possible to
      have several windows side-by-side.  The default wrapping on such
      devices looks ugly.  Therefore, please limit all lines to a maximum
      of 79 characters. For flowing long blocks of text (docstrings or
      comments), limiting the length to 72 characters is recommended.
      
      Reports error E501.

      Expected 2 blank lines, found 1
      Open

      class EmailSender:
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Separate top-level function and class definitions with two blank lines.

      Method definitions inside a class are separated by a single blank
      line.
      
      Extra blank lines may be used (sparingly) to separate groups of
      related functions.  Blank lines may be omitted between a bunch of
      related one-liners (e.g. a set of dummy implementations).
      
      Use blank lines in functions, sparingly, to indicate logical
      sections.
      
      Okay: def a():\n    pass\n\n\ndef b():\n    pass
      Okay: def a():\n    pass\n\n\nasync def b():\n    pass
      Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
      Okay: default = 1\nfoo = 1
      Okay: classify = 1\nfoo = 1
      
      E301: class Foo:\n    b = 0\n    def bar():\n        pass
      E302: def a():\n    pass\n\ndef b(n):\n    pass
      E302: def a():\n    pass\n\nasync def b(n):\n    pass
      E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
      E303: def a():\n\n\n\n    pass
      E304: @decorator\n\ndef a():\n    pass
      E305: def a():\n    pass\na()
      E306: def a():\n    def b():\n        pass\n    def c():\n        pass

      Line too long (100 > 79 characters)
      Open

              # Sendmail call will be done one at a time not over load server and create connection errors
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Limit all lines to a maximum of 79 characters.

      There are still many devices around that are limited to 80 character
      lines; plus, limiting windows to 80 characters makes it possible to
      have several windows side-by-side.  The default wrapping on such
      devices looks ugly.  Therefore, please limit all lines to a maximum
      of 79 characters. For flowing long blocks of text (docstrings or
      comments), limiting the length to 72 characters is recommended.
      
      Reports error E501.

      Line too long (81 > 79 characters)
      Open

              self, wp_report: Dict[str, Any], last_wp_report: Optional[Dict[str, Any]]
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Limit all lines to a maximum of 79 characters.

      There are still many devices around that are limited to 80 character
      lines; plus, limiting windows to 80 characters makes it possible to
      have several windows side-by-side.  The default wrapping on such
      devices looks ugly.  Therefore, please limit all lines to a maximum
      of 79 characters. For flowing long blocks of text (docstrings or
      comments), limiting the length to 72 characters is recommended.
      
      Reports error E501.

      Line too long (101 > 79 characters)
      Open

              self, wp_report: Dict[str, Any], email_to: List[str], wpscan_command: str, wpscan_version:str
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Limit all lines to a maximum of 79 characters.

      There are still many devices around that are limited to 80 character
      lines; plus, limiting windows to 80 characters makes it possible to
      have several windows side-by-side.  The default wrapping on such
      devices looks ugly.  Therefore, please limit all lines to a maximum
      of 79 characters. For flowing long blocks of text (docstrings or
      comments), limiting the length to 72 characters is recommended.
      
      Reports error E501.

      Trailing whitespace
      Open

          Handles the email nofification logic. 
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Trailing whitespace is superfluous.

      The warning returned varies on whether the line itself is blank,
      for easier filtering for those who want to indent their blank lines.
      
      Okay: spam(1)\n#
      W291: spam(1) \n#
      W293: class Foo(object):\n    \n    bang = 12

      Indentation is not a multiple of 4 (comment)
      Open

                    # No report notice
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Use indent_size (PEP8 says 4) spaces per indentation level.

      For really old code that you don't want to mess up, you can continue
      to use 8-space tabs.
      
      Okay: a = 1
      Okay: if a == 0:\n    a = 1
      E111:   a = 1
      E114:   # a = 1
      
      Okay: for item in items:\n    pass
      E112: for item in items:\npass
      E115: for item in items:\n# Hi\n    pass
      
      Okay: a = 1\nb = 2
      E113: a = 1\n    b = 2
      E116: a = 1\n    # b = 2

      Line too long (80 > 79 characters)
      Open

              """Build mail message text base on report and warnngs and info switch"""
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Limit all lines to a maximum of 79 characters.

      There are still many devices around that are limited to 80 character
      lines; plus, limiting windows to 80 characters makes it possible to
      have several windows side-by-side.  The default wrapping on such
      devices looks ugly.  Therefore, please limit all lines to a maximum
      of 79 characters. For flowing long blocks of text (docstrings or
      comments), limiting the length to 72 characters is recommended.
      
      Reports error E501.

      Line too long (89 > 79 characters)
      Open

                          Automating WPscan to scan and report vulnerable Wordpress sites <br/> 
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Limit all lines to a maximum of 79 characters.

      There are still many devices around that are limited to 80 character
      lines; plus, limiting windows to 80 characters makes it possible to
      have several windows side-by-side.  The default wrapping on such
      devices looks ugly.  Therefore, please limit all lines to a maximum
      of 79 characters. For flowing long blocks of text (docstrings or
      comments), limiting the length to 72 characters is recommended.
      
      Reports error E501.

      Line too long (94 > 79 characters)
      Open

              <td style="font-family: sans-serif; font-size: 14px; vertical-align: top;">&nbsp;</td>
      Severity: Minor
      Found in wpwatcher/email.py by pep8

      Limit all lines to a maximum of 79 characters.

      There are still many devices around that are limited to 80 character
      lines; plus, limiting windows to 80 characters makes it possible to
      have several windows side-by-side.  The default wrapping on such
      devices looks ugly.  Therefore, please limit all lines to a maximum
      of 79 characters. For flowing long blocks of text (docstrings or
      comments), limiting the length to 72 characters is recommended.
      
      Reports error E501.

      There are no issues that match your filters.

      Category
      Status