89% admin-user-delete-with-contents-disabled

Code Review | Admin User Delete With Contents Disabled

WordPress plugin Admin User Delete With Contents Disabled scored89%from 54 tests.

About plugin

  • Plugin page: admin-user-delete...
  • Plugin version: 1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9.1
  • WordPress version: 6.3.1
  • First release: Mar 12, 2022
  • Latest release: Mar 14, 2022
  • Number of updates: 8
  • Update frequency: every 0.6 days
  • Top authors: mikumo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /407 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.76ms] Passed 4 tests

This is a short check of server-side resources used by Admin User Delete With Contents Disabled
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.01 ▲0.14
Dashboard /wp-admin3.31 ▲0.0151.04 ▲0.44
Posts /wp-admin/edit.php3.36 ▲0.0152.01 ▲3.49
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.29 ▼21.75
Media Library /wp-admin/upload.php3.24 ▲0.0136.85 ▼1.86

Server storage [IO: ▲0.03MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Just a few items left to fix
  • The plugin illegally modified 1 file (4.00KB) outside of "wp-content/plugins/admin-user-delete-with-contents-disabled/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Admin User Delete With Contents Disabled
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.58 ▼0.801.80 ▲0.0341.08 ▼4.65
Dashboard /wp-admin2,218 ▲154.85 ▼0.04122.67 ▲17.3238.90 ▼5.36
Posts /wp-admin/edit.php2,100 ▲31.99 ▼0.0538.96 ▲1.2336.60 ▲2.06
Add New Post /wp-admin/post-new.php1,526 ▼1917.45 ▼5.85661.12 ▲3.5852.73 ▼1.82
Media Library /wp-admin/upload.php1,400 ▼04.23 ▲0.0099.82 ▼5.4245.17 ▼1.74

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: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
Looking good! No server-side errors or output on direct access of PHP files

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)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Donate link: Invalid URI ("")
Please take inspiration from this readme.txt

admin-user-delete-with-contents-disabled/plugin.php 85% from 13 tests

Analyzing the main PHP file in "Admin User Delete With Contents Disabled" version 1.1
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("admin-user-delete-with-contents-disabled.php" instead of "plugin.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 228 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected61 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2112237
PO File12221
Markdown1203

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin