84% trashed-by

Code Review | Trashed By

WordPress plugin Trashed By scored84%from 54 tests.

About plugin

  • Plugin page: trashed-by
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.7
  • WordPress version: 6.3.1
  • First release: May 13, 2014
  • Latest release: Jul 21, 2021
  • Number of updates: 13
  • Update frequency: every 202.0 days
  • Top authors: coffee2code (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /2,686 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼9.43ms] Passed 4 tests

Server-side resources used by Trashed By
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.33 ▼1.16
Dashboard /wp-admin3.36 ▲0.0247.74 ▼15.65
Posts /wp-admin/edit.php3.47 ▲0.1246.91 ▼5.80
Add New Post /wp-admin/post-new.php5.94 ▲0.0691.02 ▼15.10
Media Library /wp-admin/upload.php3.28 ▲0.0535.28 ▼0.77

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Trashed By
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.26 ▼0.121.54 ▼0.3139.17 ▲0.36
Dashboard /wp-admin2,198 ▲205.59 ▼0.0683.71 ▼19.0438.47 ▼1.08
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0438.76 ▼2.4534.82 ▼1.11
Add New Post /wp-admin/post-new.php1,535 ▼118.04 ▼0.37587.51 ▼24.2859.74 ▼4.06
Media Library /wp-admin/upload.php1,400 ▼04.19 ▲0.0698.82 ▲0.9544.18 ▲1.95

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/trashed-by/tests/phpunit/bootstrap.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

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
6 plugin tags: audit, post, deleted, trash, tracking...

trashed-by/trashed-by.php Passed 13 tests

The entry point to "Trashed By" version 1.4 is a PHP file that has certain tags in its header comment area
122 characters long description:
Records which user trashed a post and when they trashed it. Displays that info as columns in admin trashed posts listings.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected812 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP4232312627
Markdown3350150
Bourne Shell16221
XML10014

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity13.00
▷ Minimum class complexity6.00
▷ Maximum class complexity20.00
Average method complexity1.31
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods76
▷ Static methods1722.37%
▷ Public methods7193.42%
▷ Protected methods00.00%
▷ Private methods56.58%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin