89% delete-post-with-attachments

Code Review | Delete Post with Attachments

WordPress plugin Delete Post with Attachments scored89%from 54 tests.

About plugin

  • Plugin page: delete-post-with-...
  • Plugin version: 1.1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.0
  • WordPress version: 6.3.1
  • First release: Oct 7, 2021
  • Latest release: Jun 5, 2022
  • Number of updates: 8
  • Update frequency: every 30.3 days
  • Top authors: alsvin (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /1,427 total downloads

Benchmarks

Plugin footprint 83% 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 gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.05ms] Passed 4 tests

Server-side resources used by Delete Post with Attachments
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0139.24 ▼3.57
Dashboard /wp-admin3.32 ▲0.0150.59 ▼0.91
Posts /wp-admin/edit.php3.37 ▲0.0146.97 ▼4.71
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.76 ▼15.00
Media Library /wp-admin/upload.php3.24 ▲0.0136.43 ▲1.52

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Delete Post with Attachments
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.27 ▲0.161.63 ▼0.6745.01 ▼0.02
Dashboard /wp-admin2,198 ▲245.57 ▼0.0190.48 ▼11.9641.39 ▼1.20
Posts /wp-admin/edit.php2,097 ▼62.02 ▲0.0434.67 ▼9.5138.09 ▲3.43
Add New Post /wp-admin/post-new.php1,535 ▲718.23 ▼4.76652.49 ▼7.6576.97 ▲20.27
Media Library /wp-admin/upload.php1,394 ▼64.18 ▼0.0595.43 ▼18.5042.79 ▼6.20

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: post, delete, product, media, file...

delete-post-with-attachments/delete-post-with-attachments.php 77% from 13 tests

"Delete Post with Attachments" version 1.1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Requires at least: The required version number must match the one declared in readme.txt ("5.1" instead of "4.1")

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
Success! There were no dangerous files found in this plugin73 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1193273

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods266.67%
▷ Protected methods00.00%
▷ Private methods133.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin