78% script-filter-for-contact-form-7-google-recaptcha

Code Review | Script Filter for Contact Form 7 Google reCAPTCHA

WordPress plugin Script Filter for Contact Form 7 Google reCAPTCHA scored78%from 54 tests.

About plugin

  • Plugin page: script-filter-for...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.7
  • WordPress version: 6.3.1
  • First release: Jun 25, 2021
  • Latest release: Jun 25, 2021
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: renzocastillo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /332 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.25ms] Passed 4 tests

This is a short check of server-side resources used by Script Filter for Contact Form 7 Google reCAPTCHA
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.94 ▲1.15
Dashboard /wp-admin3.31 ▲0.0051.08 ▲1.30
Posts /wp-admin/edit.php3.36 ▲0.0046.53 ▼0.55
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.83 ▼10.90
Media Library /wp-admin/upload.php3.23 ▲0.0040.88 ▲4.30
reCAPTCHA Filter Settings /wp-admin/admin.php?page=sfcf7r3.0026.02

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Script Filter for Contact Form 7 Google reCAPTCHA
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.19 ▼0.371.84 ▼0.4143.44 ▼1.55
Dashboard /wp-admin2,192 ▲155.57 ▲0.0184.56 ▼7.1742.10 ▼1.04
Posts /wp-admin/edit.php2,100 ▼02.10 ▲0.1434.72 ▼2.0833.31 ▼2.99
Add New Post /wp-admin/post-new.php1,532 ▼623.30 ▼0.06673.39 ▼20.7763.90 ▲6.22
Media Library /wp-admin/upload.php1,397 ▼64.23 ▼0.02101.08 ▼2.5846.18 ▲0.66
reCAPTCHA Filter Settings /wp-admin/admin.php?page=sfcf7r280.440.084.10

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/script-filter-for-contact-form-7-google-recaptcha/script-filter-for-cf7-recaptcha.php:34

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=sfcf7r
    • > Network (severe)
    wp-admin/admin.php?page=sfcf7r - Failed to load resource: the server responded with a status of 403 (Forbidden)

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
2 plugin tags: recaptcha, contact form 7

script-filter-for-contact-form-7-google-recaptcha/script-filter-for-cf7-recaptcha.php 85% from 13 tests

"Script Filter for Contact Form 7 Google reCAPTCHA" version 1.0.0'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:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("script-filter-for-contact-form-7-google-recaptcha.php" instead of "script-filter-for-cf7-recaptcha.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin81 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1231181

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin