74% prevent-password-reuse

Code Review | Prevent Password Reuse

WordPress plugin Prevent Password Reuse scored74%from 54 tests.

About plugin

  • Plugin page: prevent-password-...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.0
  • WordPress version: 6.3.1
  • First release: Oct 28, 2014
  • Latest release: Oct 28, 2014
  • Number of updates: 3
  • Update frequency: every 1.7 days
  • Top authors: simonbbrown (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /1,098 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.58ms] Passed 4 tests

A check of server-side resources used by Prevent Password Reuse
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.77 ▲2.45
Dashboard /wp-admin3.33 ▲0.0243.25 ▼5.74
Posts /wp-admin/edit.php3.38 ▲0.0246.95 ▼1.78
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.07 ▼5.25
Media Library /wp-admin/upload.php3.25 ▲0.0234.86 ▲4.34

Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: 1 new table, 7 new options
New tables
wp_password_log
New WordPress options
can_compress_scripts
ppr_db_version
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Prevent Password Reuse
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.24 ▼0.111.77 ▲0.2241.03 ▼3.11
Dashboard /wp-admin2,189 ▲95.55 ▼0.1082.35 ▼3.8038.48 ▼5.27
Posts /wp-admin/edit.php2,097 ▼32.03 ▲0.0639.38 ▲1.6938.14 ▲0.85
Add New Post /wp-admin/post-new.php1,526 ▼1023.54 ▲5.11643.97 ▲10.5253.48 ▼7.44
Media Library /wp-admin/upload.php1,400 ▼04.26 ▲0.04106.71 ▼5.6645.90 ▲3.74

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_password_log
  • The uninstall procedure has failed, leaving 7 options in the database
    • ppr_db_version
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/prevent-password-reuse/ppr-class.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-includes/class-phpass.php' (include_path='.:/usr/share/php') in wp-content/plugins/prevent-password-reuse/ppr-class.php on line 3
    • > PHP Warning
      require_once(ABSPATHwp-includes/class-phpass.php): failed to open stream: No such file or directory in wp-content/plugins/prevent-password-reuse/ppr-class.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/prevent-password-reuse/prevent-password-reuse.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: security, prevent password reuse, password

prevent-password-reuse/prevent-password-reuse.php Passed 13 tests

The main PHP file in "Prevent Password Reuse" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
104 characters long description:
A Simple plugin that securely keeps track of all your users previous passwords and prevents their reuse.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin104 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23220104

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin