83% delete-comments-by-status

Code Review | Delete Comments By Status

WordPress plugin Delete Comments By Status scored83%from 54 tests.

About plugin

  • Plugin page: delete-comments-b...
  • Plugin version: 1.5.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.7.2
  • WordPress version: 6.3.1
  • First release: Aug 17, 2014
  • Latest release: Mar 1, 2017
  • Number of updates: 14
  • Update frequency: every 66.3 days
  • Top authors: shahalom (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active /40,937 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.64ms] Passed 4 tests

Server-side resources used by Delete Comments By Status
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0339.59 ▲3.74
Dashboard /wp-admin3.34 ▲0.0443.95 ▼2.60
Posts /wp-admin/edit.php3.39 ▲0.0449.00 ▼2.28
Add New Post /wp-admin/post-new.php5.92 ▲0.0491.77 ▼8.22
Media Library /wp-admin/upload.php3.26 ▲0.0335.19 ▲2.55

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Delete Comments By Status: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲1514.36 ▼0.261.74 ▼0.0645.90 ▲4.08
Dashboard /wp-admin2,207 ▲275.65 ▼0.0391.87 ▲5.2441.54 ▼1.62
Posts /wp-admin/edit.php2,115 ▲181.99 ▼0.0339.08 ▲2.4335.14 ▼3.97
Add New Post /wp-admin/post-new.php1,543 ▲1723.29 ▲0.23628.84 ▼66.2965.67 ▲8.94
Media Library /wp-admin/upload.php1,415 ▲124.22 ▲0.0697.91 ▼5.6147.69 ▲2.69

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/delete-comments-by-status/main.php:13

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 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Screenshot #1 (select-comment-status-to-delete.jpeg) image required
Please take inspiration from this readme.txt

delete-comments-by-status/main.php 85% from 13 tests

"Delete Comments By Status" version 1.5.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("delete-comments-by-status.php" instead of "main.php")

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 detected262 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP67948262

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity9.00
▷ Minimum class complexity6.00
▷ Maximum class complexity12.00
Average method complexity4.20
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin