84% expire-users

Code Review | Expire Users

WordPress plugin Expire Users scored84%from 54 tests.

About plugin

  • Plugin page: expire-users
  • Plugin version: 1.2.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.2
  • WordPress version: 6.3.1
  • First release: Aug 17, 2012
  • Latest release: Apr 7, 2023
  • Number of updates: 45
  • Update frequency: every 91.3 days
  • Top authors: husobj (100%)

Code review

54 tests

User reviews

25 reviews

Install metrics

3,000+ active /42,964 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▲3.87ms] Passed 4 tests

Server-side resources used by Expire Users
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0943.74 ▲3.74
Dashboard /wp-admin3.46 ▲0.1574.86 ▲16.36
Posts /wp-admin/edit.php3.43 ▲0.0752.53 ▼1.19
Add New Post /wp-admin/post-new.php5.98 ▲0.0999.89 ▲7.70
Media Library /wp-admin/upload.php3.30 ▲0.0738.69 ▲5.21
Expire Settings /wp-admin/users.php?page=expire_users3.2837.15

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Expire Users
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.34 ▼0.011.68 ▼0.0240.70 ▼0.19
Dashboard /wp-admin2,202 ▲315.64 ▲0.0193.00 ▲0.0746.74 ▲4.75
Posts /wp-admin/edit.php2,104 ▲41.98 ▲0.0239.28 ▲0.1236.73 ▼3.31
Add New Post /wp-admin/post-new.php1,529 ▲322.74 ▼0.76630.89 ▼34.0561.75 ▲2.32
Media Library /wp-admin/upload.php1,407 ▲74.27 ▼0.0397.41 ▼13.7441.75 ▼3.85
Expire Settings /wp-admin/users.php?page=expire_users1,2261.8123.7335.21

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • 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 everything seems fine, this is not 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
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/expire-users/admin/plugin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/expire-users/includes/shortcodes.php:3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/expire-users/admin/notifications.php on line 44
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/expire-users/admin/notifications.php on line 44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/expire-users/includes/shortcodes.php:3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/expire-users/admin/notifications.php on line 44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/expire-users/admin/help.php:3

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 uses markdown syntax to describe your plugin to the world
5 plugin tags: expire, login, password, users, roles

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

This is the main PHP file of "Expire Users" version 1.2.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
33 characters long description:
Set expiry dates for user logins.

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 plugin2,101 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP122223901,114
PO File4326512941
CSS18326
JavaScript14220

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity11.17
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods87
▷ Static methods1213.79%
▷ Public methods87100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There are no PNG files in this plugin