68% google-captcha

Code Review | reCaptcha by BestWebSoft

WordPress plugin reCaptcha by BestWebSoft scored68%from 54 tests.

About plugin

  • Plugin page: google-captcha
  • Plugin version: 1.73
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3
  • WordPress version: 6.3.1
  • First release: Feb 7, 2014
  • Latest release: Aug 24, 2023
  • Number of updates: 107
  • Update frequency: every 32.6 days
  • Top authors: bestwebsoft (100%)

Code review

54 tests

User reviews

379 reviews

Install metrics

200,000+ active /5,168,351 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.96MB] [CPU: ▲11.43ms] Passed 4 tests

A check of server-side resources used by reCaptcha by BestWebSoft
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.47 ▲1.0050.64 ▲9.49
Dashboard /wp-admin4.29 ▲0.9862.16 ▲10.18
Posts /wp-admin/edit.php4.34 ▲0.9858.89 ▲12.47
Add New Post /wp-admin/post-new.php6.83 ▲0.94107.46 ▲20.58
Media Library /wp-admin/upload.php4.15 ▲0.9248.00 ▲13.56

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 148 new files
Database: 1 new table, 8 new options
New tables
wp_gglcptch_allowlist
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
gglcptch_options
bstwbsftwppdtplgns_options
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for reCaptcha by BestWebSoft
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲7113.33 ▼1.051.92 ▼0.4842.19 ▼1.23
Dashboard /wp-admin2,246 ▲555.88 ▼0.0299.40 ▼17.2538.10 ▼5.34
Posts /wp-admin/edit.php2,129 ▲402.07 ▲0.0336.25 ▲0.3231.85 ▼1.01
Add New Post /wp-admin/post-new.php1,548 ▲2923.25 ▼0.06604.32 ▼69.9348.84 ▼6.02
Media Library /wp-admin/upload.php1,422 ▲344.31 ▲0.1497.20 ▼2.4642.66 ▼2.52
Allow List /wp-admin/google-captcha-allowlist.php260.440.1313.24
BWS Panel /wp-admin/google-captcha.php?page=gglcptch-bws-panel260.440.065.83
Settings /wp-admin/google-captcha.php260.440.066.09

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_gglcptch_allowlist
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% 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)
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
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/google-captcha/includes/allowlist.php on line 12
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/google-captcha/includes/allowlist.php on line 12
    • > PHP Fatal error
      Uncaught Error: Class 'Bws_Settings_Tabs' not found in wp-content/plugins/google-captcha/includes/class-gglcptch-settings-tabs.php:6
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/google-captcha/includes/allowlist.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/google-captcha/bws_menu/class-bws-settings.php:1453
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/google-captcha/google-captcha.php:1227
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/google-captcha/bws_menu/product_list.php:9

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/google-captcha-allowlist.php
    • > Network (severe)
    wp-admin/google-captcha-allowlist.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/google-captcha.php?page=gglcptch-bws-panel
    • > Network (severe)
    wp-admin/google-captcha.php?page=gglcptch-bws-panel - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/google-captcha.php
    • > Network (severe)
    wp-admin/google-captcha.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
  • Screenshots: Add images for these screenshots: #1 (Login form with reCaptcha.), #2 (Registration form with reCaptcha.), #3 (Lost password form with reCaptcha.), #4 (Comments form with reCaptcha.), #5 (Contact Form with reCaptcha.), #6 (The form with reCaptcha dark theme.), #7 (reCaptcha Settings page.), #8 (reCaptcha Allow List page.)
Please take inspiration from this readme.txt

google-captcha/google-captcha.php Passed 13 tests

"reCaptcha by BestWebSoft" version 1.73's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
82 characters long description:
Protect WordPress website forms from spam entries with Google Captcha (reCaptcha).

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
Success! There were no dangerous files found in this plugin31,216 lines of code in 55 files:
LanguageFilesBlank linesComment linesLines of code
PO File197,58013,09418,047
PHP126667886,679
CSS121582575,419
JavaScript878140904
SVG400167

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity91.75
▷ Minimum class complexity21.00
▷ Maximum class complexity210.00
Average method complexity9.64
▷ Minimum method complexity1.00
▷ Maximum method complexity79.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods42
▷ Static methods00.00%
▷ Public methods3583.33%
▷ Protected methods00.00%
▷ Private methods716.67%
Functions111
▷ Named functions111100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
68 PNG files occupy 4.15MB with 1.56MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
bws_menu/css/jquery-ui-styles/1.9.2/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
bws_menu/css/jquery-ui-styles/1.12.1/images/ui-bg_glass_75_e6e6e6_1x400.png0.32KB0.15KB▼ 53.40%
bws_menu/css/jquery-ui-styles/1.12.1/images/ui-icons_888888_256x240.png6.94KB4.18KB▼ 39.78%
bws_menu/css/jquery-ui-styles/1.12.1/images/ui-icons_454545_256x240.png6.92KB4.18KB▼ 39.61%
bws_menu/css/jquery-ui-styles/1.9.2/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%