84% wp-strong-password

Code Review | WP strong password

WordPress plugin WP strong password scored84%from 54 tests.

About plugin

  • Plugin page: wp-strong-password
  • Plugin version: 0.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.5
  • WordPress version: 6.3.1
  • First release: Jul 1, 2020
  • Latest release: Aug 4, 2020
  • Number of updates: 6
  • Update frequency: every 5.7 days
  • Top authors: abhijitrakas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /4,911 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.79ms] Passed 4 tests

Analyzing server-side resources used by WP strong password
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.58 ▼5.58
Dashboard /wp-admin3.31 ▲0.0048.81 ▼0.63
Posts /wp-admin/edit.php3.36 ▲0.0049.36 ▲6.69
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.71 ▼3.39
Media Library /wp-admin/upload.php3.23 ▲0.0031.63 ▼1.55

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 48 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for WP strong password
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.58 ▼0.731.74 ▼0.1640.52 ▼1.50
Dashboard /wp-admin2,206 ▲184.86 ▲0.01106.57 ▲1.5342.00 ▲4.87
Posts /wp-admin/edit.php2,086 ▼32.01 ▲0.0439.30 ▼5.3834.90 ▼2.26
Add New Post /wp-admin/post-new.php1,533 ▼923.01 ▲4.65598.11 ▼12.1052.52 ▼2.85
Media Library /wp-admin/upload.php1,385 ▼34.19 ▼0.0597.55 ▲3.0542.71 ▲1.44

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 10× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'ZxcvbnPhp\\Matchers\\Match' not found in wp-content/plugins/wp-strong-password/vendor/bjeavons/zxcvbn-php/src/Matchers/DictionaryMatch.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ZxcvbnPhp\\Matchers\\Match' not found in wp-content/plugins/wp-strong-password/vendor/bjeavons/zxcvbn-php/src/Matchers/SequenceMatch.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'ZxcvbnPhp\\Matchers\\MatchInterface' not found in wp-content/plugins/wp-strong-password/vendor/bjeavons/zxcvbn-php/src/Matchers/Match.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ZxcvbnPhp\\Matchers\\DictionaryMatch' not found in wp-content/plugins/wp-strong-password/vendor/bjeavons/zxcvbn-php/src/Matchers/L33tMatch.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'ZxcvbnPhp\\Matchers\\DictionaryMatch' not found in wp-content/plugins/wp-strong-password/vendor/bjeavons/zxcvbn-php/src/Matchers/ReverseDictionaryMatch.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ZxcvbnPhp\\Matchers\\Match' not found in wp-content/plugins/wp-strong-password/vendor/bjeavons/zxcvbn-php/src/Matchers/DateMatch.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ZxcvbnPhp\\Matchers\\Match' not found in wp-content/plugins/wp-strong-password/vendor/bjeavons/zxcvbn-php/src/Matchers/RepeatMatch.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'ZxcvbnPhp\\Matchers\\Match' not found in wp-content/plugins/wp-strong-password/vendor/bjeavons/zxcvbn-php/src/Matchers/YearMatch.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ZxcvbnPhp\\Matchers\\Match' not found in wp-content/plugins/wp-strong-password/vendor/bjeavons/zxcvbn-php/src/Matchers/SpatialMatch.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ZxcvbnPhp\\Matchers\\Match' not found in wp-content/plugins/wp-strong-password/vendor/bjeavons/zxcvbn-php/src/Matchers/Bruteforce.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Donate link: Please fix this invalid URI: "#"
You can take inspiration from this readme.txt

wp-strong-password/wp-strong-password.php 92% from 13 tests

The principal PHP file in "WP strong password" v. 0.0.3 is loaded by WordPress automatically on each request
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin5,072 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
PHP305928544,796
Python22773140
JSON300114
JavaScript15915
XML1307

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity22.30
▷ Minimum class complexity1.00
▷ Maximum class complexity153.00
Average method complexity3.77
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces4
Interfaces1
Traits0
Classes19
▷ Abstract classes15.26%
▷ Concrete classes1894.74%
▷ Final classes15.56%
Methods148
▷ Static methods7852.70%
▷ Public methods10671.62%
▷ Protected methods3624.32%
▷ Private methods64.05%
Functions57
▷ Named functions4273.68%
▷ Anonymous functions1526.32%
Constants32
▷ Global constants515.62%
▷ Class constants2784.38%
▷ Public constants2177.78%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin