94% admin-cleanup

Code Review | Admin Cleanup

WordPress plugin Admin Cleanup scored 94% 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: 5.9.2
  • 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

7 reviews

Install metrics

700+ active / 5,964 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

Server-side resources used by Admin Cleanup
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0451.55 ▼4.89
Dashboard /wp-admin3.45 ▲0.0433.27 ▼1.47
Posts /wp-admin/edit.php3.68 ▲0.0438.69 ▲0.82
Add New Post /wp-admin/post-new.php6.92 ▼0.0594.84 ▼1,200.09
Media Library /wp-admin/upload.php3.33 ▲0.0424.12 ▲1.04
Admin Cleanup /wp-admin/options-general.php?page=admin-cleanup3.3022.93

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Admin Cleanup
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,771 ▲2716.26 ▲0.276.17 ▲0.192.35 ▲0.13
Dashboard /wp-admin2,900 ▲426.14 ▼0.08117.92 ▼14.74157.32 ▼9.22
Posts /wp-admin/edit.php2,696 ▲53.24 ▼0.0062.76 ▼2.80140.54 ▼5.61
Add New Post /wp-admin/post-new.php1,674 ▲1318.37 ▲2.70419.47 ▼0.52156.68 ▲3.90
Media Library /wp-admin/upload.php1,703 ▲55.49 ▼0.04140.74 ▼5.27182.14 ▼0.82
Admin Cleanup /wp-admin/options-general.php?page=admin-cleanup1,1772.5353.32115.70

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

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
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > 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 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: admin bar, admin, hide menu, admin menu, cleanup

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

The entry point to "Admin Cleanup" version 1.0.2 is a PHP file that has certain tags in its header comment area
31 characters long description:
Clean up the admin sidebar menu

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected220 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13613209
Markdown19011

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
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

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