84% disallow-pwned-passwords

Code Review | Disallow Pwned Password

WordPress plugin Disallow Pwned Password scored84%from 54 tests.

About plugin

  • Plugin page: disallow-pwned-pa...
  • Plugin version: 0.3.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-5.0.3
  • WordPress version: 6.3.1
  • First release: Feb 19, 2019
  • Latest release: Feb 19, 2019
  • Number of updates: 8
  • Update frequency: every 0.1 days
  • Top authors: tangrufus (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /1,233 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.28MB] [CPU: ▼2.93ms] Passed 4 tests

An overview of server-side resources used by Disallow Pwned Password
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2939.90 ▼7.77
Dashboard /wp-admin3.59 ▲0.2948.60 ▼3.11
Posts /wp-admin/edit.php3.64 ▲0.2850.48 ▲5.55
Add New Post /wp-admin/post-new.php6.17 ▲0.28101.47 ▼4.49
Media Library /wp-admin/upload.php3.51 ▲0.2837.72 ▲3.65

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 64 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Disallow Pwned Password
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.65 ▼0.801.70 ▼0.4240.82 ▼4.72
Dashboard /wp-admin2,206 ▲184.84 ▼1.01113.04 ▼4.2440.28 ▼2.65
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0141.75 ▲4.9636.25 ▲0.94
Add New Post /wp-admin/post-new.php1,542 ▲2818.35 ▲0.74614.67 ▼68.0251.18 ▼1.66
Media Library /wp-admin/upload.php1,382 ▼94.17 ▼0.0698.67 ▼2.6139.48 ▼4.04

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 33× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\Container\\Inflector\\InflectorAggregateInterface' not found in wp-content/plugins/disallow-pwned-passwords/vendor/league/container/src/Inflector/InflectorAggregate.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\Container\\Definition\\DefinitionAggregateInterface' not found in wp-content/plugins/disallow-pwned-passwords/vendor/league/container/src/Definition/DefinitionAggregate.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\\ContainerExceptionInterface' not found in wp-content/plugins/disallow-pwned-passwords/vendor/psr/container/src/NotFoundExceptionInterface.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\\ContainerInterface' not found in wp-content/plugins/disallow-pwned-passwords/vendor/league/container/src/Container.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\Container\\Argument\\RawArgumentInterface' not found in wp-content/plugins/disallow-pwned-passwords/vendor/league/container/src/Argument/RawArgument.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\Container\\ServiceProvider\\ServiceProviderInterface' not found in wp-content/plugins/disallow-pwned-passwords/vendor/league/container/src/ServiceProvider/BootableServiceProviderInterface.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\Container\\Argument\\ClassNameInterface' not found in wp-content/plugins/disallow-pwned-passwords/vendor/league/container/src/Argument/ClassName.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\\ContainerExceptionInterface' not found in wp-content/plugins/disallow-pwned-passwords/vendor/typisttech/wp-contained-hook/src/Exceptions/ContainerException.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\\ContainerExceptionInterface' not found in wp-content/plugins/disallow-pwned-passwords/vendor/league/container/src/Exception/ContainerException.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Itineris\\DisallowPwnedPasswords\\Handlers\\AbstractFormSubmission' not found in wp-content/plugins/disallow-pwned-passwords/src/Handlers/FormSubmission.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes: The official readme.txt might help

disallow-pwned-passwords/disallow-pwned-passwords.php Passed 13 tests

The main PHP script in "Disallow Pwned Password" version 0.3.2 is automatically included on every request by WordPress
63 characters long description:
Disallow WordPress and WooCommerce users using pwned passwords.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin1,838 lines of code in 59 files:
LanguageFilesBlank linesComment linesLines of code
PHP575181,2131,775
Markdown221063

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity3.98
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.26
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces14
Interfaces19
Traits3
Classes30
▷ Abstract classes310.00%
▷ Concrete classes2790.00%
▷ Final classes00.00%
Methods173
▷ Static methods31.73%
▷ Public methods16193.06%
▷ Protected methods116.36%
▷ Private methods10.58%
Functions8
▷ Named functions225.00%
▷ Anonymous functions675.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin