68% auto-trash-delete

Code Review | Auto Trash Delete

WordPress plugin Auto Trash Delete scored 68% from 54 tests.

About plugin

  • Plugin page: auto-trash-delete
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.3.1
  • WordPress version: 6.3.1
  • First release: Oct 29, 2015
  • Latest release: Oct 29, 2015
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: kenny.eliason (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,146 total downloads

Benchmarks

Plugin footprint 65% from 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.91MB] [CPU: ▼48.99ms] Passed 4 tests

An overview of server-side resources used by Auto Trash Delete
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.396.39 ▼34.09
Dashboard /wp-admin2.09 ▼1.217.04 ▼39.37
Posts /wp-admin/edit.php2.09 ▼1.265.50 ▼36.35
Add New Post /wp-admin/post-new.php2.09 ▼3.795.70 ▼86.14
Media Library /wp-admin/upload.php2.09 ▼1.146.18 ▼26.13
Auto Trash Settings /wp-admin/options-general.php?page=auto-trash_setting2.095.99

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Auto Trash Delete
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3713.26 ▼1.361.85 ▼0.0342.96 ▼2.07
Dashboard /wp-admin2,194 ▲25.81 ▲0.87102.92 ▼10.7744.15 ▲4.85
Posts /wp-admin/edit.php2,093 ▲72.02 ▼0.0235.35 ▲1.1134.70 ▲3.63
Add New Post /wp-admin/post-new.php1,541 ▼123.01 ▲4.66650.68 ▲19.1655.24 ▲7.01
Media Library /wp-admin/upload.php1,392 ▲44.33 ▲0.12101.25 ▲8.1743.59 ▼2.51
Auto Trash Settings /wp-admin/options-general.php?page=auto-trash_setting7812.0323.1525.26

Uninstaller [IO: ▲0.00MB] [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
Please fix the following items
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/auto-trash-delete/auto-delete-trash.php+148
    Trying to access array offset on value of type bool
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=auto-trash_setting
    • > Notice in wp-content/plugins/auto-trash-delete/auto-delete-trash.php+148
    Trying to access array offset on value of type bool

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/auto-trash-delete/auto-delete-trash.php:143

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Screenshots: Screenshot #1 (The Settings Page) image missing
Please take inspiration from this readme.txt

auto-trash-delete/auto-delete-trash.php 92% from 13 tests

"Auto Trash Delete" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("auto-trash-delete.php" instead of "auto-delete-trash.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin84 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1165284

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.29
▷ Minimum method complexity1.00
▷ Maximum method complexity2.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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin