90% expire-user-passwords

Code Review | Expire User Passwords

WordPress plugin Expire User Passwords scored90%from 54 tests.

About plugin

  • Plugin page: expire-user-passw...
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0.1
  • WordPress version: 6.3.1
  • First release: Dec 3, 2019
  • Latest release: Oct 1, 2022
  • Number of updates: 15
  • Update frequency: every 68.9 days
  • Top authors: MillerMediaNow (93.33%)millermediadev (13.33%)

Code review

54 tests

User reviews

4 reviews

Install metrics

7,000+ active /46,562 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼7.90ms] Passed 4 tests

Server-side resources used by Expire User Passwords
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1254.97 ▲9.46
Dashboard /wp-admin3.42 ▲0.1252.56 ▼0.61
Posts /wp-admin/edit.php3.54 ▲0.1850.30 ▼0.58
Add New Post /wp-admin/post-new.php6.00 ▲0.1287.92 ▼29.99
Media Library /wp-admin/upload.php3.35 ▲0.1238.53 ▼0.43
Expire User Passwords /wp-admin/users.php?page=Expire_User_passwords3.3932.37

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Expire User Passwords: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.69 ▲0.341.76 ▼0.2043.53 ▲1.36
Dashboard /wp-admin2,196 ▲155.61 ▼0.0498.49 ▼5.3542.23 ▼3.24
Posts /wp-admin/edit.php2,104 ▲72.02 ▲0.0436.32 ▲0.0535.25 ▼2.34
Add New Post /wp-admin/post-new.php1,529 ▲323.78 ▲0.14679.23 ▲0.4465.27 ▲3.77
Media Library /wp-admin/upload.php1,407 ▲104.17 ▲0.0293.42 ▼9.9041.42 ▼2.57
Expire User Passwords /wp-admin/users.php?page=Expire_User_passwords8592.1625.3927.97

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 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 everything seems fine, this is not an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: profile, security, passwords, login, admin...

expire-user-passwords/expire-user-passwords.php Passed 13 tests

The main PHP file in "Expire User Passwords" ver. 1.3.1 adds more information about the plugin and also serves as the entry point for this plugin
67 characters long description:
Require certain users to change their passwords on a regular basis.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin679 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP4221228420
PO File57594259

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity13.00
▷ Minimum class complexity7.00
▷ Maximum class complexity21.00
Average method complexity2.55
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes4100.00%
Methods31
▷ Static methods1032.26%
▷ Public methods2890.32%
▷ Protected methods13.23%
▷ Private methods26.45%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG images were found in this plugin