78% visualwp-cloudflare-turnstile

Code Review | VisualWP Cloudflare Turnstile - Easy Anti-Spam alternative to CAPTCHA

WordPress plugin VisualWP Cloudflare Turnstile - Easy Anti-Spam alternative to CAPTCHA scored78%from 54 tests.

About plugin

  • Plugin page: visualwp-cloudfla...
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.2
  • WordPress version: 6.3.1
  • First release: Nov 29, 2022
  • Latest release: Apr 6, 2023
  • Number of updates: 12
  • Update frequency: every 11.1 days
  • Top authors: sightfactory (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /303 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
This plugin's installer ran successfully

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

This is a short check of server-side resources used by VisualWP Cloudflare Turnstile - Easy Anti-Spam alternative to CAPTCHA
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.62 ▼5.00
Dashboard /wp-admin3.32 ▲0.0245.80 ▼0.96
Posts /wp-admin/edit.php3.37 ▲0.0144.95 ▼3.41
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.33 ▼10.30
Media Library /wp-admin/upload.php3.24 ▲0.0136.42 ▲4.03
Turnstile /wp-admin/options-general.php?page=vwptn-turnstile3.2130.42

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

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

Browser metrics Passed 4 tests

A check of browser resources used by VisualWP Cloudflare Turnstile - Easy Anti-Spam alternative to CAPTCHA
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,904 ▲15813.62 ▼0.938.89 ▲7.1737.33 ▼5.04
Dashboard /wp-admin2,216 ▲455.86 ▼0.0497.97 ▼20.0238.80 ▼1.47
Posts /wp-admin/edit.php2,099 ▲72.17 ▲0.1640.10 ▼0.5833.61 ▼1.82
Add New Post /wp-admin/post-new.php1,523 ▼1023.19 ▼0.02615.36 ▼89.5544.61 ▼20.40
Media Library /wp-admin/upload.php1,401 ▲164.11 ▼0.1397.02 ▼12.2442.96 ▼2.86
Turnstile /wp-admin/options-general.php?page=vwptn-turnstile8462.0826.9232.56

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/visualwp-cloudflare-turnstile/index.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=vwptn-turnstile
    • > Console-api (warning) in unknown
    https://challenges.cloudflare.com/turnstile/v0/api.js?ver=1 0:7101 "[Cloudflare Turnstile] Unknown parameter passed to api.js: \"?ver=...\", ignoring."

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention: The official readme.txt is a good inspiration

visualwp-cloudflare-turnstile/visualwp-cloudflare-turnstile.php 85% from 13 tests

The main PHP script in "VisualWP Cloudflare Turnstile - Easy Anti-Spam alternative to CAPTCHA" version 1.0.4 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 247 characters long)
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Everything looks great! No dangerous files found in this plugin1,106 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS313055745
PHP212145334
JavaScript110327

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods00.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions1794.44%
▷ Anonymous functions15.56%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/images/vwp-logo.png6.17KB3.20KB▼ 48.24%