74% change-wp-empty-trash-time

Code Review | Change Empty Trash Time

WordPress plugin Change Empty Trash Time scored 74% from 54 tests.

About plugin

  • Plugin page: change-wp-empty-t...
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Aug 1, 2019
  • Latest release: Feb 23, 2023
  • Number of updates: 13
  • Update frequency: every 100.2 days
  • Top authors: carlosmr96 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active / 3,756 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.91MB] [CPU: ▼30.68ms] Passed 4 tests

Server-side resources used by Change Empty Trash Time
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.44 ▼2.65
Dashboard /wp-admin3.03 ▼0.2725.30 ▼28.56
Posts /wp-admin/edit.php3.03 ▼0.3227.38 ▼26.29
Add New Post /wp-admin/post-new.php3.03 ▼2.8530.47 ▼58.93
Media Library /wp-admin/upload.php3.03 ▼0.2024.76 ▼8.93

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Change Empty Trash Time
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲1113.26 ▼1.481.74 ▼0.5241.61 ▲0.14
Dashboard /wp-admin2,209 ▼04.86 ▼0.99108.13 ▲10.3041.82 ▲2.29
Posts /wp-admin/edit.php2,089 ▼31.96 ▼0.0948.02 ▲8.0039.18 ▲3.72
Add New Post /wp-admin/post-new.php1,547 ▲1918.20 ▼0.05694.85 ▲74.3864.51 ▼4.30
Media Library /wp-admin/upload.php1,388 ▼04.24 ▲0.0496.31 ▼3.3641.77 ▼3.01

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/change-wp-empty-trash-time/change-wp-empty-trash-time.php+28
    Trying to access array offset on value of type bool
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please 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/change-wp-empty-trash-time/change-wp-empty-trash-time.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: trash, bin, empty, time

change-wp-empty-trash-time/change-wp-empty-trash-time.php Passed 13 tests

Analyzing the main PHP file in "Change Empty Trash Time" version 1.0.4
133 characters long description:
This plugin creates a new setting at the end of Settings > General that allows to select the time that WordPress take to empty trash.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected116 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PO File2141475
PHP202341

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
2 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.PNG19.79KB10.71KB▼ 45.89%
assets/screenshot-2.PNG7.75KB4.86KB▼ 37.25%