84% recaptcha-woo

Code Review | reCAPTCHA for WooCommerce

WordPress plugin reCAPTCHA for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: recaptcha-woo
  • Plugin version: 1.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-6.4.0
  • WordPress version: 6.3.1
  • First release: Jun 7, 2022
  • Latest release: Oct 26, 2023
  • Number of updates: 58
  • Update frequency: every 8.7 days
  • Top authors: Elliotvs (100%)

Code review

54 tests

User reviews

30 reviews

Install metrics

10,000+ active /54,629 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼2.43ms] Passed 4 tests

Analyzing server-side resources used by reCAPTCHA for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1236.35 ▲0.97
Dashboard /wp-admin3.42 ▲0.1249.45 ▲1.11
Posts /wp-admin/edit.php3.54 ▲0.1842.74 ▼2.19
Add New Post /wp-admin/post-new.php6.03 ▲0.1380.48 ▼8.75
Media Library /wp-admin/upload.php3.35 ▲0.1135.85 ▲0.27
reCAPTCHA WooCommerce /wp-admin/options-general.php?page=recaptcha-woo/admin-options.php3.3233.70

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
rcfwc_tested
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by reCAPTCHA for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,919 ▲15815.05 ▲0.709.23 ▲7.6743.32 ▼0.32
Dashboard /wp-admin2,205 ▲315.55 ▼0.1192.91 ▲8.3141.12 ▼5.10
Posts /wp-admin/edit.php2,110 ▲102.81 ▲0.8639.51 ▲1.0731.59 ▼5.31
Add New Post /wp-admin/post-new.php1,535 ▲724.00 ▲0.71691.98 ▲40.4537.41 ▼15.88
Media Library /wp-admin/upload.php1,407 ▲105.10 ▲0.90102.15 ▼8.4740.88 ▼5.58
reCAPTCHA WooCommerce /wp-admin/options-general.php?page=recaptcha-woo/admin-options.php1,0932.6930.7159.56

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
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • rcfwc_tested
    • widget_recent-comments

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 | 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
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 plugin_dir_path() in wp-content/plugins/recaptcha-woo/recaptcha-woo.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: protect, woocommerce, recaptcha, spam, checkout

recaptcha-woo/recaptcha-woo.php 92% from 13 tests

The main PHP file in "reCAPTCHA for WooCommerce" ver. 1.3.2 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.7" instead of "3.4")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected537 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP29552524
JavaScript10113

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.57
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%
Functions25
▷ Named functions2288.00%
▷ Anonymous functions312.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin