90% trash-fail-safe

Code Review | Trash Fail Safe

WordPress plugin Trash Fail Safe scored90%from 54 tests.

About plugin

  • Plugin page: trash-fail-safe
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Apr 18, 2020
  • Latest release: Aug 13, 2023
  • Number of updates: 12
  • Update frequency: every 101.0 days
  • Top authors: mikehealy (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /845 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

This is a short check of server-side resources used by Trash Fail Safe
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.82 ▼2.39
Dashboard /wp-admin3.31 ▼0.0341.89 ▼15.97
Posts /wp-admin/edit.php3.36 ▲0.0143.43 ▲0.21
Add New Post /wp-admin/post-new.php5.91 ▲0.0379.15 ▼8.81
Media Library /wp-admin/upload.php3.23 ▲0.0133.90 ▲0.13

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Trash Fail Safe
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8113.24 ▼1.412.07 ▲0.4438.81 ▲1.41
Dashboard /wp-admin2,208 ▲165.79 ▲0.83106.81 ▼6.1738.90 ▼0.32
Posts /wp-admin/edit.php2,088 ▼82.01 ▲0.0236.07 ▲2.9032.88 ▲2.59
Add New Post /wp-admin/post-new.php1,539 ▲2018.38 ▼4.63603.47 ▲6.5650.39 ▼4.02
Media Library /wp-admin/upload.php1,390 ▲24.21 ▼0.0696.42 ▲1.7742.40 ▲2.02

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention: You can take inspiration from this readme.txt

trash-fail-safe/trash-fail-safe.php Passed 13 tests

This is the main PHP file of "Trash Fail Safe" version 1.2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
123 characters long description:
Require confirmation before deleting items from the Trash, or emptying the whole trash. Protects against accidental clicks.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected45 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript110338
PHP14207

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin