84% gf-hcaptcha

Code Review | G-Forms hCaptcha

WordPress plugin G-Forms hCaptcha scored 84% from 54 tests.

About plugin

  • Plugin page: gf-hcaptcha
  • Plugin version: 1.3.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0
  • WordPress version: 6.3.1
  • First release: Jan 30, 2020
  • Latest release: Jul 15, 2022
  • Number of updates: 23
  • Update frequency: every 39.3 days
  • Top authors: webandappeasy (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

3,000+ active / 14,552 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.01MB] [CPU: ▲0.19ms] Passed 4 tests

This is a short check of server-side resources used by G-Forms hCaptcha
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.59 ▼5.48
Dashboard /wp-admin3.31 ▲0.0165.76 ▲14.45
Posts /wp-admin/edit.php3.36 ▲0.0151.89 ▲5.81
Add New Post /wp-admin/post-new.php5.89 ▲0.0196.19 ▼2.10
Media Library /wp-admin/upload.php3.23 ▲0.0139.19 ▲2.52

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

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

Browser metrics Passed 4 tests

G-Forms hCaptcha: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▼014.48 ▲0.071.89 ▼0.6942.97 ▼4.86
Dashboard /wp-admin2,206 ▲34.82 ▼1.06114.90 ▲5.7340.93 ▼1.46
Posts /wp-admin/edit.php2,092 ▲32.17 ▲0.1746.16 ▲4.0334.06 ▼4.70
Add New Post /wp-admin/post-new.php1,528 ▼1423.00 ▲4.89694.81 ▲10.3260.09 ▼1.82
Media Library /wp-admin/upload.php1,388 ▼34.29 ▲0.0895.81 ▼7.5040.72 ▼7.11

Uninstaller [IO: ✅] [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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
Please fix the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gf-hcaptcha/gf-hcaptcha.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'GFForms' not found in wp-content/plugins/gf-hcaptcha/class-hcaptchaaddon.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
  • Contributors: Plugin contributors not specified
Please take inspiration from this readme.txt

gf-hcaptcha/gf-hcaptcha.php Passed 13 tests

The entry point to "G-Forms hCaptcha" version 1.3.1 is a PHP file that has certain tags in its header comment area
82 characters long description:
A new way to monetize your site traffic with the hCaptcha addon for Gravity Forms.

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 plugin659 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP48383446
PO File28292211
SVG2002

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity12.67
▷ Minimum class complexity2.00
▷ Maximum class complexity27.00
Average method complexity1.68
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods20
▷ Static methods210.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.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
No PNG files were detected