10% simple-spam-blocker

Code Review | Simple Spam Blocker

WordPress plugin Simple Spam Blocker scored 10% from 54 tests.

About plugin

  • Plugin page: simple-spam-blocker
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2
  • WordPress version: 6.3.1
  • First release: Oct 26, 2019
  • Latest release: Apr 25, 2023
  • Number of updates: 18
  • Update frequency: every 71.0 days
  • Top authors: awais300 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 681 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/simple-spam-blocker/includes/class-spam-blocker.php+184
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.09MB] [CPU: ▼2.78ms] Passed 4 tests

An overview of server-side resources used by Simple Spam Blocker
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0940.69 ▲0.86
Dashboard /wp-admin3.39 ▲0.0947.72 ▼1.35
Posts /wp-admin/edit.php3.51 ▲0.1548.80 ▼2.58
Add New Post /wp-admin/post-new.php5.97 ▲0.0995.23 ▼8.04
Media Library /wp-admin/upload.php3.31 ▲0.0936.46 ▲2.95

Server storage [IO: ▲0.05MB] [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: 23 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Spam Blocker
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,849 ▲11414.85 ▲0.632.24 ▲0.4347.00 ▲2.78
Dashboard /wp-admin2,222 ▲315.80 ▲0.89103.86 ▼3.2264.01 ▲22.05
Posts /wp-admin/edit.php2,108 ▲191.97 ▼0.0639.58 ▼2.1634.46 ▼5.31
Add New Post /wp-admin/post-new.php1,532 ▲1322.87 ▼0.32718.91 ▲21.6457.29 ▼5.49
Media Library /wp-admin/upload.php1,401 ▲134.24 ▼0.0298.76 ▼12.6973.83 ▲27.33

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/simple-spam-blocker/public/partials/spam-blocker-public-display.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/simple-spam-blocker/admin/partials/spam-blocker-admin-display.php on line 33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/simple-spam-blocker/admin/partials/spam-blocker-admin-display.php:35
    • > PHP Notice
      Undefined variable: honeypot_options in wp-content/plugins/simple-spam-blocker/admin/partials/spam-blocker-admin-display.php on line 33

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Plugin Name: Please specify the plugin name on the first line ( === simple-spam-blocker === )
The official readme.txt is a good inspiration

simple-spam-blocker/simple-spam-blocker.php 92% from 13 tests

The main PHP file in "Simple Spam Blocker" ver. 2.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin400 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12155612394
JavaScript24546
CSS2140

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity6.57
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity2.05
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods37
▷ Static methods25.41%
▷ Public methods3286.49%
▷ Protected methods00.00%
▷ Private methods513.51%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin