84% simple-no-bot

Code Review | Invisible Anti Spam for Contact Form 7 (Simple No-Bot)

WordPress plugin Invisible Anti Spam for Contact Form 7 (Simple No-Bot) scored84%from 54 tests.

About plugin

  • Plugin page: simple-no-bot
  • Plugin version: 2.2.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.3
  • WordPress version: 6.3.1
  • First release: May 4, 2017
  • Latest release: Jan 12, 2020
  • Number of updates: 18
  • Update frequency: every 54.7 days
  • Top authors: lilaeamedia (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /2,253 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.05MB] [CPU: ▼2.96ms] Passed 4 tests

An overview of server-side resources used by Invisible Anti Spam for Contact Form 7 (Simple No-Bot)
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0544.06 ▲2.75
Dashboard /wp-admin3.35 ▲0.0549.89 ▼2.86
Posts /wp-admin/edit.php3.40 ▲0.0548.15 ▼3.00
Add New Post /wp-admin/post-new.php5.93 ▲0.0587.90 ▼5.91
Media Library /wp-admin/upload.php3.27 ▲0.0535.95 ▼0.06

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Invisible Anti Spam for Contact Form 7 (Simple No-Bot): an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,873 ▲11213.45 ▼0.909.49 ▲7.7042.10 ▲0.90
Dashboard /wp-admin2,195 ▲145.65 ▼0.0588.30 ▼22.8839.88 ▼2.97
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0334.18 ▼3.1134.71 ▼3.94
Add New Post /wp-admin/post-new.php1,526 ▼223.34 ▲0.29649.80 ▼0.0851.83 ▼8.39
Media Library /wp-admin/upload.php1,397 ▼64.20 ▲0.03103.41 ▲1.4744.15 ▼1.43

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/simple-no-bot/snb.php:290

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 17 tag instead of maximum 10
Please take inspiration from this readme.txt

simple-no-bot/snb.php 92% from 13 tests

The entry point to "Invisible Anti Spam for Contact Form 7 (Simple No-Bot)" version 2.2.5 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("simple-no-bot.php" instead of "snb.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin366 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP11874203
JavaScript21732163

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity49.00
▷ Minimum class complexity49.00
▷ Maximum class complexity49.00
Average method complexity5.36
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin