tristanlatr / WPWatcher

Wordpress Watcher is a wrapper for WPScan that manages scans on multiple sites and reports by email and/or syslog. Schedule scans and get notified when vulnerabilities, outdated plugins and other risks are found.
https://wpwatcher.readthedocs.io
Apache License 2.0
47 stars 18 forks source link

Refactor email.py to address Code Climate issues #63

Open thatvideoshopguy opened 1 year ago

thatvideoshopguy commented 1 year ago

Description:

The email.py file has several issues reported by Code Climate. These issues include high cyclomatic complexity, cognitive complexity, and maintainability. In order to improve the code quality, we should address the following:

  1. High cyclomatic complexity: Break down complex functions into smaller, more focused functions. This will make the code more readable and maintainable.
  2. High cognitive complexity: Simplify the logic in some of the functions by using helper functions or more straightforward control structures.
  3. Maintainability: Refactor the code to improve its maintainability and readability.

Some areas to focus on for improvement include:

These improvements should help address the issues reported by Code Climate and improve the overall quality of the email.py file.