100% expire-passwords

Code Review | Expire Passwords

WordPress plugin Expire Passwords scored 100% from 54 tests.

About plugin

  • Plugin page: expire-passwords
  • Plugin version: 0.6.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7
  • WordPress version: 5.8.1
  • First release: Apr 28, 2015
  • Latest release: Jan 5, 2017
  • Number of updates: 16
  • Update frequency: every 38.6 days
  • Top authors: fjarrett (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

1,000+ active / 21,015 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.07MB] [CPU: ▼143.26ms] Passed 4 tests

Analyzing server-side resources used by Expire Passwords
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.0735.00 ▲6.27
Dashboard /wp-admin3.14 ▲0.0843.63 ▲2.17
Posts /wp-admin/edit.php3.25 ▲0.1336.76 ▼16.70
Add New Post /wp-admin/post-new.php5.49 ▲0.0684.74 ▼554.57
Media Library /wp-admin/upload.php3.08 ▲0.0831.52 ▼3.95
Expire Passwords /wp-admin/users.php?page=expire_passwords3.1229.24

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Expire Passwords
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲4715.80 ▲0.288.73 ▲0.6744.40 ▼3.01
Dashboard /wp-admin2,978 ▲476.12 ▼0.02144.28 ▼4.98110.37 ▲3.10
Posts /wp-admin/edit.php2,744 ▲52.70 ▼0.0066.87 ▲4.8398.30 ▲3.90
Add New Post /wp-admin/post-new.php2,060 ▲38819.37 ▲0.43369.76 ▼7.45107.42 ▼0.73
Media Library /wp-admin/upload.php1,812 ▲55.03 ▲0.01156.03 ▲9.85114.77 ▼4.54
Expire Passwords /wp-admin/users.php?page=expire_passwords1,0802.0955.2070.59

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Everything seems fine, however this is by no means an exhaustive test

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: users, admin, security, passwords, profile...

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

"Expire Passwords" version 0.6.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
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 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin506 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP4215207350
PO File34657156

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity11.50
▷ Minimum class complexity7.00
▷ Maximum class complexity21.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes4100.00%
Methods28
▷ Static methods1035.71%
▷ Public methods2692.86%
▷ Protected methods00.00%
▷ Private methods27.14%
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

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin