84% contact-form-7-anti-spambot

Code Review | Contact Form 7 Anti Spambot

WordPress plugin Contact Form 7 Anti Spambot scored84%from 54 tests.

About plugin

  • Plugin page: contact-form-7-an...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.3-4.1
  • WordPress version: 6.3.1
  • First release: Mar 26, 2015
  • Latest release: Mar 26, 2015
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: SzMake (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,978 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
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼5.77ms] Passed 4 tests

An overview of server-side resources used by Contact Form 7 Anti Spambot
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0940.76 ▼6.83
Dashboard /wp-admin3.39 ▲0.0853.37 ▼0.73
Posts /wp-admin/edit.php3.50 ▲0.1449.78 ▼4.55
Add New Post /wp-admin/post-new.php5.97 ▲0.0896.35 ▼10.98
Media Library /wp-admin/upload.php3.31 ▲0.0836.41 ▼0.56

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Contact Form 7 Anti Spambot
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲3114.27 ▼0.261.82 ▲0.0143.75 ▼0.75
Dashboard /wp-admin2,192 ▲155.57 ▼0.1386.42 ▼5.0440.61 ▲0.26
Posts /wp-admin/edit.php2,100 ▼02.00 ▲0.0534.58 ▼2.7634.40 ▼0.01
Add New Post /wp-admin/post-new.php1,534 ▲618.07 ▼4.93642.26 ▼52.2760.47 ▲2.33
Media Library /wp-admin/upload.php1,397 ▼34.20 ▲0.0199.57 ▼0.7140.73 ▼5.45

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/contact-form-7-anti-spambot/contact-form-7-anti-spambot.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact-form-7-anti-spambot/cf7asb-admin.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
The official readme.txt might help

contact-form-7-anti-spambot/contact-form-7-anti-spambot.php 92% from 13 tests

The principal PHP file in "Contact Form 7 Anti Spambot" v. 1.0.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 287 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected644 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP311539476
PO File1242364
CSS15055
JavaScript210849

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
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%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/blkfrogman.png10.86KB4.64KB▼ 57.25%