84% rj-quick-empty-trash

Code Review | RJ Quick Empty Trash

WordPress plugin RJ Quick Empty Trash scored84%from 54 tests.

About plugin

  • Plugin page: rj-quick-empty-trash
  • Plugin version: 0.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8
  • WordPress version: 6.3.1
  • First release: Nov 21, 2013
  • Latest release: Dec 14, 2013
  • Number of updates: 4
  • Update frequency: every 5.8 days
  • Top authors: randyjensen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,020 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

This is a short check of server-side resources used by RJ Quick Empty Trash
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.93 ▲0.99
Dashboard /wp-admin3.33 ▼0.0246.61 ▼12.49
Posts /wp-admin/edit.php3.44 ▲0.0943.62 ▼7.36
Add New Post /wp-admin/post-new.php5.91 ▲0.0294.38 ▲7.46
Media Library /wp-admin/upload.php3.25 ▲0.0237.38 ▲2.38

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
RJQET_Plugin__installed
widget_theysaidso_widget
RJQET_Plugin__version
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for RJ Quick Empty Trash
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.18 ▼1.054.46 ▲2.7743.89 ▲3.35
Dashboard /wp-admin2,209 ▲184.84 ▼0.19102.83 ▲1.5143.34 ▼0.24
Posts /wp-admin/edit.php2,094 ▲52.02 ▼0.0435.80 ▼3.9334.20 ▼2.46
Add New Post /wp-admin/post-new.php1,533 ▲423.20 ▲5.06631.35 ▼6.2049.72 ▼10.97
Media Library /wp-admin/upload.php1,388 ▼34.17 ▼0.1195.66 ▼2.0643.71 ▲0.68

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • RJQET_Plugin__installed
    • can_compress_scripts
    • widget_recent-comments
    • RJQET_Plugin__version
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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 following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/rj-quick-empty-trash/rj-quick-empty-trash.php:67

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: trash, rj, quick, randy jensen, empty

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

The primary PHP file in "RJ Quick Empty Trash" version 0.0.2 is used by WordPress to initiate all plugin functionality
62 characters long description:
Easier access to empty the trash for Posts, Pages and Comments

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin562 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP8144438562

PHP code Passed 2 tests

A short 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.33
Average class complexity10.67
▷ Minimum class complexity1.00
▷ Maximum class complexity42.00
Average method complexity1.78
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes233.33%
▷ Concrete classes466.67%
▷ Final classes00.00%
Methods76
▷ Static methods00.00%
▷ Public methods4863.16%
▷ Protected methods2836.84%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin