84% mhm-catch-comment-spam

Code Review | Simplest comment spam catcher

WordPress plugin Simplest comment spam catcher scored84%from 54 tests.

About plugin

  • Plugin page: mhm-catch-comment...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: Apr 1, 2016
  • Latest release: Nov 11, 2022
  • Number of updates: 15
  • Update frequency: every 161.0 days
  • Top authors: markhowellsmead (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,261 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 gracefully, with no errors

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

Analyzing server-side resources used by Simplest comment spam catcher
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.34 ▼1.16
Dashboard /wp-admin3.31 ▲0.0146.35 ▲2.05
Posts /wp-admin/edit.php3.36 ▲0.0148.15 ▲0.54
Add New Post /wp-admin/post-new.php5.89 ▲0.0185.24 ▼17.63
Media Library /wp-admin/upload.php3.23 ▲0.0135.48 ▲1.02

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simplest comment spam catcher
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.22 ▼1.181.71 ▼0.2344.57 ▼0.54
Dashboard /wp-admin2,209 ▲184.85 ▼0.03110.52 ▲5.7840.79 ▼7.43
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0539.40 ▲2.2135.89 ▼0.35
Add New Post /wp-admin/post-new.php1,533 ▲1923.44 ▲5.87672.58 ▲59.5163.96 ▲9.73
Media Library /wp-admin/upload.php1,382 ▼94.28 ▲0.0696.62 ▼3.6644.01 ▲2.30

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/mhm-catch-comment-spam/index.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: form, spam, comment_form_after_fields, comment spam, honeypot...

mhm-catch-comment-spam/index.php 85% from 13 tests

"Simplest comment spam catcher" version 1.0.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 179 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("mhm-catch-comment-spam.php" instead of "index.php")

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
Everything looks great! No dangerous files found in this plugin21 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP171021

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin