83% plugins-garbage-collector

Code Review | Plugins Garbage Collector (Database Cleanup)

WordPress plugin Plugins Garbage Collector (Database Cleanup) scored 83% from 54 tests.

About plugin

  • Plugin page: plugins-garbage-c...
  • Plugin version: 0.14
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9.2
  • WordPress version: 6.3.1
  • First release: Apr 30, 2010
  • Latest release: Apr 3, 2022
  • Number of updates: 112
  • Update frequency: every 38.9 days
  • Top authors: shinephp (100%)

Code review

54 tests

User reviews

88 reviews

Install metrics

20,000+ active / 412,648 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼6.62ms] Passed 4 tests

This is a short check of server-side resources used by Plugins Garbage Collector (Database Cleanup)
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1338.39 ▼3.53
Dashboard /wp-admin3.45 ▲0.1448.50 ▼16.97
Posts /wp-admin/edit.php3.56 ▲0.2048.06 ▲0.88
Add New Post /wp-admin/post-new.php6.02 ▲0.1494.37 ▼4.90
Media Library /wp-admin/upload.php3.37 ▲0.1436.61 ▼1.09

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Plugins Garbage Collector (Database Cleanup): an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.46 ▲0.171.61 ▼0.0341.71 ▼3.15
Dashboard /wp-admin2,210 ▲224.86 ▼0.11107.16 ▼42.5742.75 ▼1.11
Posts /wp-admin/edit.php2,093 ▲42.06 ▲0.0339.43 ▼2.5735.34 ▼1.24
Add New Post /wp-admin/post-new.php1,536 ▼022.89 ▼0.27710.21 ▲110.5453.72 ▲12.28
Media Library /wp-admin/upload.php1,392 ▲44.20 ▲0.0098.46 ▲2.6340.79 ▼2.47
Database Cleanup /wp-admin/plugins-garbage-collector.php260.440.0711.64

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
    • > GET request to /wp-admin/plugins-garbage-collector.php
    • > Network (severe)
    wp-admin/plugins-garbage-collector.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add an image for screenshot #1 (screenshot-1.png Plugins Garbage Collector scan action results.)
The official readme.txt is a good inspiration

plugins-garbage-collector/plugins-garbage-collector.php 85% from 13 tests

The primary PHP file in "Plugins Garbage Collector (Database Cleanup)" version 0.14 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("./lang/")
  • Description: Please don't use more than 140 characters for the plugin description (currently 189 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
Everything looks great! No dangerous files found in this plugin1,367 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP5289118993
JavaScript14711292
CSS2191578
JSON4004

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity11.50
▷ Minimum class complexity8.00
▷ Maximum class complexity15.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods21
▷ Static methods1152.38%
▷ Public methods1257.14%
▷ Protected methods00.00%
▷ Private methods942.86%
Functions32
▷ Named functions32100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants550.00%
▷ Class constants550.00%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
15 PNG files occupy 0.22MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/vendors/jquery-ui/images/ui-icons_454545_256x240.png6.83KB4.17KB▼ 38.86%
css/vendors/jquery-ui/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.27KB0.18KB▼ 35.00%
css/vendors/jquery-ui/images/ui-bg_glass_55_fbf9ee_1x400.png0.33KB0.12KB▼ 62.09%
css/vendors/jquery-ui/images/ui-bg_flat_0_aaaaaa_40x100.png0.21KB0.08KB▼ 58.96%
css/vendors/jquery-ui/images/ui-icons_888888_256x240.png6.83KB4.17KB▼ 38.92%