84% enable-turnstile-cloudflare-for-gravity-forms

Code Review | Enable Turnstile (Cloudflare) for Gravity Forms

WordPress plugin Enable Turnstile (Cloudflare) for Gravity Forms scored84%from 54 tests.

About plugin

  • Plugin page: enable-turnstile-...
  • Plugin version: 1.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.3
  • WordPress version: 6.3.1
  • First release: Mar 10, 2023
  • Latest release: Jul 22, 2023
  • Number of updates: 14
  • Update frequency: every 10.6 days
  • Top authors: SS88_UK (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /466 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
Installer ran successfully

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

This is a short check of server-side resources used by Enable Turnstile (Cloudflare) for Gravity Forms
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.55 ▼1.06
Dashboard /wp-admin3.31 ▲0.0151.77 ▼26.65
Posts /wp-admin/edit.php3.36 ▲0.0149.52 ▼5.83
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.49 ▼14.46
Media Library /wp-admin/upload.php3.23 ▲0.0135.31 ▼2.32

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Enable Turnstile (Cloudflare) for Gravity Forms
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.26 ▼1.121.82 ▲0.1543.21 ▲0.12
Dashboard /wp-admin2,206 ▲154.87 ▼1.05116.30 ▲14.5942.70 ▲3.03
Posts /wp-admin/edit.php2,089 ▼32.01 ▲0.0037.61 ▼6.4533.27 ▼3.72
Add New Post /wp-admin/post-new.php1,533 ▼423.17 ▲4.74674.15 ▲35.6156.10 ▲5.12
Media Library /wp-admin/upload.php1,388 ▼04.15 ▼0.1193.12 ▼10.6944.51 ▼1.40

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/enable-turnstile-cloudflare-for-gravity-forms/ss88-gravity-forms-turnstile.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'GFForms' not found in wp-content/plugins/enable-turnstile-cloudflare-for-gravity-forms/class.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: spam, cloudflare, protection, turnstile, gravity forms...

enable-turnstile-cloudflare-for-gravity-forms/ss88-gravity-forms-turnstile.php 92% from 13 tests

The entry point to "Enable Turnstile (Cloudflare) for Gravity Forms" version 1.6 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("enable-turnstile-cloudflare-for-gravity-forms.php" instead of "ss88-gravity-forms-turnstile.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin324 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP31128272
CSS14031
JavaScript116021

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity10.33
▷ Minimum class complexity2.00
▷ Maximum class complexity15.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods21
▷ Static methods314.29%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
There are no PNG files in this plugin