78% inactive-user-deleter

Code Review | Inactive User Deleter

WordPress plugin Inactive User Deleter scored78%from 54 tests.

About plugin

  • Plugin page: inactive-user-del...
  • Plugin version: 1.63
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.0-6.3
  • WordPress version: 6.3.1
  • First release: Jan 20, 2010
  • Latest release: Aug 28, 2023
  • Number of updates: 167
  • Update frequency: every 29.8 days
  • Top authors: shra (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

1,000+ active /29,878 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼9.10ms] Passed 4 tests

This is a short check of server-side resources used by Inactive User Deleter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1041.09 ▼9.75
Dashboard /wp-admin3.41 ▲0.1151.24 ▲3.97
Posts /wp-admin/edit.php3.46 ▲0.1047.25 ▼0.06
Add New Post /wp-admin/post-new.php5.99 ▲0.1187.22 ▼29.73
Media Library /wp-admin/upload.php3.33 ▲0.1038.73 ▲3.13
Inactive users /wp-admin/users.php?page=inactive-user-deleter/inactive-user-deleter.php3.4933.02

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Inactive User Deleter
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.80 ▲0.431.76 ▼0.0746.13 ▲7.21
Dashboard /wp-admin2,210 ▲225.88 ▲0.98110.71 ▲9.4944.52 ▲1.37
Posts /wp-admin/edit.php2,090 ▲12.00 ▼0.1834.61 ▼6.0433.82 ▼5.35
Add New Post /wp-admin/post-new.php1,546 ▲418.41 ▲0.34600.79 ▼25.2461.12 ▲9.12
Media Library /wp-admin/upload.php1,389 ▼24.21 ▼0.0196.83 ▼6.1644.55 ▼3.83
Inactive users /wp-admin/users.php?page=inactive-user-deleter/inactive-user-deleter.php1,5071.7731.5436.63

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 does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/users.php?page=inactive-user-deleter/inactive-user-deleter.php
    • > Notice in wp-content/plugins/inactive-user-deleter/templates/user_filter.tpl.php+24
    Undefined index: f_approve
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/users.php?page=inactive-user-deleter/inactive-user-deleter.php
    • > Notice in wp-content/plugins/inactive-user-deleter/templates/user_filter.tpl.php+60
    Undefined index: has_recs
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/users.php?page=inactive-user-deleter/inactive-user-deleter.php
    • > Notice in wp-content/plugins/inactive-user-deleter/templates/user_filter.tpl.php+98
    Undefined index: f_usereverlogin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/users.php?page=inactive-user-deleter/inactive-user-deleter.php
    • > Notice in wp-content/plugins/inactive-user-deleter/templates/user_filter.tpl.php+120
    Undefined index: f_userdisabled
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/users.php?page=inactive-user-deleter/inactive-user-deleter.php
    • > Notice in wp-content/plugins/inactive-user-deleter/templates/user_filter.tpl.php+166
    Undefined index: f_lastlogin
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/users.php?page=inactive-user-deleter/inactive-user-deleter.php
    • > Notice in wp-content/plugins/inactive-user-deleter/templates/user_filter.tpl.php+203
    Undefined index: user_role
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/users.php?page=inactive-user-deleter/inactive-user-deleter.php
    • > Notice in wp-content/plugins/inactive-user-deleter/templates/user_filter.tpl.php+220
    Undefined index: max_size_output
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/users.php?page=inactive-user-deleter/inactive-user-deleter.php
    • > Notice in wp-content/plugins/inactive-user-deleter/templates/user_filter.tpl.php+242
    Undefined index: sort_order

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 15× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/inactive-user-deleter/templates/inform-form.tpl.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/inactive-user-deleter/templates/header.tpl.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/inactive-user-deleter/templates/about-page.tpl.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function inactive_user_deleter\\is_admin() in wp-content/plugins/inactive-user-deleter/inactive-user-deleter.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/inactive-user-deleter/templates/nav-menu.tpl.php:3
    • > PHP Notice
      Undefined variable: OP in wp-content/plugins/inactive-user-deleter/templates/inform-form.tpl.php on line 4
    • > PHP Notice
      Undefined variable: version in wp-content/plugins/inactive-user-deleter/templates/about-page.tpl.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/inactive-user-deleter/templates/users_list_html.tpl.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/inactive-user-deleter/templates/inform-form.tpl.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/inactive-user-deleter/templates/users_list_csv.tpl.php:7

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 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
Please take inspiration from this readme.txt

inactive-user-deleter/inactive-user-deleter.php 92% from 13 tests

"Inactive User Deleter" version 1.63's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 210 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,486 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP11205881,430
CSS16056

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity72.50
▷ Minimum class complexity69.00
▷ Maximum class complexity76.00
Average method complexity7.22
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods23
▷ Static methods1147.83%
▷ Public methods2191.30%
▷ Protected methods00.00%
▷ Private methods28.70%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin