89% wp-contact-form-7-spam-blocker

Code Review | Spam Protect for Contact Form 7

WordPress plugin Spam Protect for Contact Form 7 scored89%from 54 tests.

About plugin

  • Plugin page: wp-contact-form-7...
  • Plugin version: 1.1.9
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.4
  • WordPress version: 6.3.1
  • First release: Apr 1, 2020
  • Latest release: Dec 2, 2023
  • Number of updates: 25
  • Update frequency: every 53.6 days
  • Top authors: nysl (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

10,000+ active /43,612 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼7.24ms] Passed 4 tests

This is a short check of server-side resources used by Spam Protect for Contact Form 7
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1036.11 ▼3.12
Dashboard /wp-admin3.40 ▲0.1043.67 ▼6.35
Posts /wp-admin/edit.php3.51 ▲0.1645.17 ▼1.27
Add New Post /wp-admin/post-new.php6.00 ▲0.1180.60 ▼18.21
Media Library /wp-admin/upload.php3.32 ▲0.0932.78 ▲0.47

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Spam Protect for Contact Form 7
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,877 ▲11513.74 ▼0.498.07 ▲6.3638.20 ▼5.39
Dashboard /wp-admin2,199 ▲225.77 ▲0.0688.81 ▼8.5540.36 ▼7.70
Posts /wp-admin/edit.php2,104 ▲41.99 ▲0.0038.64 ▼2.7135.61 ▼2.36
Add New Post /wp-admin/post-new.php1,530 ▲423.22 ▲0.15655.88 ▲36.3556.99 ▲1.26
Media Library /wp-admin/upload.php1,407 ▲44.18 ▲0.0198.22 ▲0.5142.60 ▲0.14

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
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Donate link: Please fix this invalid URI: "support@nysoftwarelab.com"
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
The official readme.txt is a good inspiration

wp-contact-form-7-spam-blocker/spam-protect-for-contact-form7.php 85% from 13 tests

The main file in "Spam Protect for Contact Form 7" v. 1.1.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-contact-form-7-spam-blocker.php" instead of "spam-protect-for-contact-form7.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin365 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP10134341347
CSS20412
JavaScript24546

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity4.14
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity1.69
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods32
▷ Static methods26.25%
▷ Public methods2784.38%
▷ Protected methods00.00%
▷ Private methods515.62%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin