90% quick-empty-trash

Code Review | Quick Empty Trash

WordPress plugin Quick Empty Trash scored90%from 54 tests.

About plugin

  • Plugin page: quick-empty-trash
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.0
  • WordPress version: 6.3.1
  • First release: Feb 8, 2014
  • Latest release: Dec 3, 2018
  • Number of updates: 10
  • Update frequency: every 176.0 days
  • Top authors: hlashbrooke (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

800+ active /10,376 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼13.57ms] Passed 4 tests

This is a short check of server-side resources used by Quick Empty Trash
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0034.48 ▼16.07
Dashboard /wp-admin3.31 ▲0.0143.68 ▼6.18
Posts /wp-admin/edit.php3.36 ▲0.0143.26 ▼4.60
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.42 ▼27.43
Media Library /wp-admin/upload.php3.23 ▲0.0033.53 ▼0.14

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Quick Empty Trash
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.68 ▼0.701.70 ▼0.1740.24 ▼2.93
Dashboard /wp-admin2,209 ▲214.83 ▼1.05100.12 ▼3.0037.77 ▼5.77
Posts /wp-admin/edit.php2,088 ▼12.01 ▲0.0035.06 ▼5.4632.14 ▼2.98
Add New Post /wp-admin/post-new.php1,533 ▲1423.13 ▲0.08644.12 ▼11.4559.14 ▲5.88
Media Library /wp-admin/upload.php1,388 ▼04.16 ▼0.0695.96 ▼1.9643.31 ▼4.50

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
The SRP test was a success

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 an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: quick, utility, bin, empty, trash

quick-empty-trash/quick-empty-trash.php Passed 13 tests

The main PHP file in "Quick Empty Trash" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
131 characters long description:
Adds an 'empty trash' button to all post type tables - saves you from needing to load the trash list before being able to empty it.

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
Good job! No executable or dangerous file extensions detected43 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3183442
CSS1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.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