78% wp-spam-comments

Code Review | WP Spam Comments from BlashO

WordPress plugin WP Spam Comments from BlashO scored78%from 54 tests.

About plugin

  • Plugin page: wp-spam-comments
  • Plugin version: 1.4
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.1
  • WordPress version: 6.3.1
  • First release: Oct 15, 2015
  • Latest release: Jan 15, 2018
  • Number of updates: 10
  • Update frequency: every 82.5 days
  • Top authors: ven4online (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,357 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
This plugin's installer ran successfully

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

An overview of server-side resources used by WP Spam Comments from BlashO
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.95 ▼0.82
Dashboard /wp-admin3.35 ▼0.0048.54 ▼21.44
Posts /wp-admin/edit.php3.40 ▲0.0450.45 ▼7.62
Add New Post /wp-admin/post-new.php5.93 ▲0.04105.78 ▲11.40
Media Library /wp-admin/upload.php3.27 ▲0.0434.40 ▲0.05
Spam Comments /wp-admin/options-general.php?page=wpspamcomments_option3.2129.98

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 9 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
wpspamcommscheduled_val
wpspamcommhours_val
can_compress_scripts
wpspamcommtotal_val
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Spam Comments from BlashO
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲6413.24 ▼1.141.81 ▼0.1545.47 ▲3.27
Dashboard /wp-admin2,216 ▲255.81 ▲0.87101.54 ▼19.8530.75 ▼10.84
Posts /wp-admin/edit.php2,099 ▲102.01 ▼0.0240.12 ▼2.3232.20 ▼1.86
Add New Post /wp-admin/post-new.php1,523 ▼517.74 ▼5.44649.49 ▲55.9854.04 ▲5.96
Media Library /wp-admin/upload.php1,392 ▲74.22 ▲0.0195.71 ▼0.6842.66 ▲0.31
Spam Comments /wp-admin/options-general.php?page=wpspamcomments_option8942.0524.9932.57

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 9 options
    • wpspamcommtotal_val
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • wpspamcommscheduled_val
    • widget_theysaidso_widget
    • wpspamcommhours_val

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=wpspamcomments_option
    • > Notice in wp-content/plugins/wp-spam-comments/wpspamcomments.php+129
    Undefined index: _wpnonce

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
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-spam-comments/wpspamcomments.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 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
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Different modes of spam comments removal) image missing
  • Tags: Please reduce the number of tags, currently 18 tag instead of maximum 10
The official readme.txt might help

wp-spam-comments/wpspamcomments.php 92% from 13 tests

The main file in "WP Spam Comments from BlashO" v. 1.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-spam-comments.php" instead of "wpspamcomments.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin224 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12434224

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png19.49KB11.86KB▼ 39.14%