84% gf-google-captcha

Code Review | Invisible reCaptcha addon for Gravity Forms

WordPress plugin Invisible reCaptcha addon for Gravity Forms scored84%from 54 tests.

About plugin

  • Plugin page: gf-google-captcha
  • Plugin version: 1.0.11
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.2.2
  • WordPress version: 6.3.1
  • First release: Jul 18, 2019
  • Latest release: Jul 23, 2019
  • Number of updates: 16
  • Update frequency: every 0.5 days
  • Top authors: foxagency (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active /10,607 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼7.04ms] Passed 4 tests

Analyzing server-side resources used by Invisible reCaptcha addon for Gravity Forms
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.52 ▼1.98
Dashboard /wp-admin3.32 ▼0.0347.45 ▼11.18
Posts /wp-admin/edit.php3.37 ▲0.0050.52 ▲2.99
Add New Post /wp-admin/post-new.php5.90 ▲0.0091.64 ▼17.22
Media Library /wp-admin/upload.php3.24 ▲0.0037.95 ▲2.22

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Invisible reCaptcha addon for Gravity Forms: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.38 ▼0.202.12 ▼0.0444.95 ▲5.52
Dashboard /wp-admin2,192 ▲155.58 ▼0.1282.67 ▼9.3138.91 ▼10.27
Posts /wp-admin/edit.php2,100 ▼02.05 ▲0.0640.31 ▲0.2737.95 ▲5.13
Add New Post /wp-admin/post-new.php1,531 ▼1623.11 ▼0.14611.79 ▼26.0964.06 ▲6.53
Media Library /wp-admin/upload.php1,403 ▲124.25 ▲0.0898.64 ▼7.7845.89 ▼2.42

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 2× 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/gf-google-captcha/index.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'GFForms' not found in wp-content/plugins/gf-google-captcha/class-gfgooglecaptchaaddon.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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
6 plugin tags: gravity forms, forms, addon, invisible recaptcha, recaptcha 3...

gf-google-captcha/index.php 92% from 13 tests

"Invisible reCaptcha addon for Gravity Forms" version 1.0.11's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("gf-google-captcha.php" instead of "index.php")

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
Everything looks great! No dangerous files found in this plugin318 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP37980266
JavaScript16549
CSS1003

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity10.33
▷ Minimum class complexity2.00
▷ Maximum class complexity19.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity8.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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin