90% batch-comment-spam-deletion

Code Review | Batch Comment Spam Deletion

WordPress plugin Batch Comment Spam Deletion scored90%from 54 tests.

About plugin

  • Plugin page: batch-comment-spa...
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.9
  • WordPress version: 6.3.1
  • First release: Jun 2, 2014
  • Latest release: Oct 27, 2017
  • Number of updates: 13
  • Update frequency: every 95.5 days
  • Top authors: mordauk (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active /23,859 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.01MB] [CPU: ▼1.06ms] Passed 4 tests

A check of server-side resources used by Batch Comment Spam Deletion
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.87 ▲2.02
Dashboard /wp-admin3.31 ▲0.0144.07 ▼4.45
Posts /wp-admin/edit.php3.36 ▲0.0144.15 ▼1.83
Add New Post /wp-admin/post-new.php5.89 ▲0.0196.94 ▲13.20
Media Library /wp-admin/upload.php3.24 ▲0.0133.33 ▲0.04
Empty Spam /wp-admin/edit-comments.php?page=pw-bcpd-process3.2029.42
All Comments /wp-admin/edit-comments.php3.2536.94

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Batch Comment Spam Deletion: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲4114.25 ▼0.101.81 ▲0.2745.77 ▲2.57
Dashboard /wp-admin2,205 ▲245.55 ▼0.1884.69 ▼16.6038.32 ▼4.70
Posts /wp-admin/edit.php2,113 ▲131.98 ▼0.0234.76 ▼2.8333.53 ▼4.18
Add New Post /wp-admin/post-new.php1,549 ▲2318.49 ▼4.74612.64 ▼73.8067.47 ▲8.32
Media Library /wp-admin/upload.php1,407 ▲104.18 ▼0.0596.60 ▼4.6341.28 ▼1.89
Empty Spam /wp-admin/edit-comments.php?page=pw-bcpd-process2,4803.0238.0550.12
All Comments /wp-admin/edit-comments.php1,8202.2735.9334.12

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests Passed 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 Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: comments, comment, spam

batch-comment-spam-deletion/batch-comment-spam-deletion.php 92% from 13 tests

The main PHP script in "Batch Comment Spam Deletion" version 1.0.6 is automatically included on every request by WordPress
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 201 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected117 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15172117

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity3.88
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods8100.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin