84% admin-cleanup

Code Review | Admin Cleanup

WordPress plugin Admin Cleanup scored84%from 54 tests.

About plugin

  • Plugin page: admin-cleanup
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.7.1
  • WordPress version: 6.3.1
  • First release: Apr 19, 2016
  • Latest release: Apr 29, 2021
  • Number of updates: 7
  • Update frequency: every 262.1 days
  • Top authors: mgibbs189 (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

600+ active /6,747 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.63ms] Passed 4 tests

This is a short check of server-side resources used by Admin Cleanup
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.79 ▼3.97
Dashboard /wp-admin3.35 ▲0.0455.65 ▼4.45
Posts /wp-admin/edit.php3.40 ▲0.0453.57 ▲1.99
Add New Post /wp-admin/post-new.php5.93 ▲0.0489.62 ▼18.42
Media Library /wp-admin/upload.php3.27 ▲0.0439.32 ▲0.32
Admin Cleanup /wp-admin/options-general.php?page=admin-cleanup3.2333.42

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Admin Cleanup: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.28 ▲0.001.76 ▲0.0441.71 ▼2.09
Dashboard /wp-admin2,202 ▲245.60 ▼0.1189.80 ▼22.9837.24 ▼9.48
Posts /wp-admin/edit.php2,107 ▲72.01 ▲0.0232.59 ▼6.0334.91 ▲1.77
Add New Post /wp-admin/post-new.php1,542 ▲1318.17 ▼4.74622.45 ▼55.9358.53 ▼7.77
Media Library /wp-admin/upload.php1,404 ▲44.24 ▲0.0595.71 ▼17.4041.46 ▼6.59
Admin Cleanup /wp-admin/options-general.php?page=admin-cleanup9371.6826.2929.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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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/admin-cleanup/admin-cleanup.php:22

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 errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: admin, admin bar, admin menu, hide menu, cleanup

admin-cleanup/admin-cleanup.php Passed 13 tests

"Admin Cleanup" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
31 characters long description:
Clean up the admin sidebar menu

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin220 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13613209
Markdown19011

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity36.00
▷ Minimum class complexity36.00
▷ Maximum class complexity36.00
Average method complexity6.00
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.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