84% user-access-expiration

Code Review | User Access Expiration

WordPress plugin User Access Expiration scored84%from 54 tests.

About plugin

  • Plugin page: user-access-expir...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.1
  • WordPress version: 6.3.1
  • First release: Oct 2, 2011
  • Latest release: Dec 26, 2014
  • Number of updates: 17
  • Update frequency: every 69.5 days
  • Top authors: NateJacobs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /5,543 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼1.53ms] Passed 4 tests

An overview of server-side resources used by User Access Expiration
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0241.59 ▼0.39
Dashboard /wp-admin3.33 ▲0.0350.96 ▲5.32
Posts /wp-admin/edit.php3.38 ▲0.0250.92 ▲0.75
Add New Post /wp-admin/post-new.php5.91 ▲0.0291.44 ▼6.95
Media Library /wp-admin/upload.php3.25 ▲0.0235.17 ▲0.47
User Expiration /wp-admin/options-general.php?page=user-access-expiration3.2232.36

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
user_access_expire_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for User Access Expiration
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4314.75 ▲0.491.62 ▼0.0829.60 ▼16.04
Dashboard /wp-admin2,202 ▲225.57 ▼0.0893.75 ▼0.1344.47 ▲4.48
Posts /wp-admin/edit.php2,107 ▲42.02 ▲0.0240.15 ▼2.1437.36 ▲0.15
Add New Post /wp-admin/post-new.php1,531 ▲323.15 ▲0.13648.25 ▲17.7554.79 ▲3.96
Media Library /wp-admin/upload.php1,404 ▲44.17 ▲0.0197.52 ▼9.7446.12 ▲0.78
User Expiration /wp-admin/options-general.php?page=user-access-expiration8271.9922.3525.32

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
  • Zombie WordPress options detected upon uninstall: 7 options
    • user_access_expire_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/user-access-expiration/user-access-expiration.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: expiration, access, user

user-access-expiration/user-access-expiration.php 92% from 13 tests

This is the main PHP file of "User Access Expiration" version 1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 176 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin229 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP230173229

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity2.21
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin