73% advanced-google-recaptcha

Code Review | Advanced Google reCAPTCHA

WordPress plugin Advanced Google reCAPTCHA scored73%from 54 tests.

About plugin

  • Plugin page: advanced-google-r...
  • Plugin version: 1.15
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Mar 11, 2021
  • Latest release: Nov 30, 2023
  • Number of updates: 58
  • Update frequency: every 17.1 days
  • Top authors: wpconcern (70.69%)WebFactory (31.03%)

Code review

54 tests

User reviews

401 reviews

Install metrics

90,000+ active /491,127 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.72MB] [CPU: ▼5.33ms] Passed 4 tests

A check of server-side resources used by Advanced Google reCAPTCHA
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.23 ▲0.7745.21 ▲3.81
Dashboard /wp-admin4.07 ▲0.7251.20 ▼14.27
Posts /wp-admin/edit.php4.12 ▲0.7648.16 ▲1.55
Add New Post /wp-admin/post-new.php6.60 ▲0.7293.34 ▼12.39
Media Library /wp-admin/upload.php3.93 ▲0.7042.58 ▲12.49
Advanced Google reCAPTCHA /wp-admin/options-general.php?page=wpcaptcha4.0352.85

Server storage [IO: ▲1.72MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 73 new files
Database: 2 new tables, 8 new options
New tables
wp_wpc_accesslocks
wp_wpc_login_fails
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
wpcaptcha_meta
widget_recent-posts
theysaidso_admin_options
wpcaptcha_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Advanced Google reCAPTCHA
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲8114.35 ▲0.081.70 ▼0.0538.85 ▼5.54
Dashboard /wp-admin2,245 ▲655.77 ▲0.1798.21 ▲0.0046.17 ▼0.75
Posts /wp-admin/edit.php2,153 ▲532.28 ▲0.2545.49 ▲5.5037.77 ▲0.95
Add New Post /wp-admin/post-new.php1,540 ▲1423.16 ▼0.00662.36 ▲19.7351.96 ▼1.89
Media Library /wp-admin/upload.php1,453 ▲504.33 ▲0.13107.71 ▲7.5748.55 ▲4.88
Advanced Google reCAPTCHA /wp-admin/options-general.php?page=wpcaptcha3,5465.62145.50294.43

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_wpc_accesslocks
    • wp_wpc_login_fails
  • Zombie WordPress options were found after uninstall: 8 options
    • theysaidso_admin_options
    • widget_recent-posts
    • wpcaptcha_meta
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • wpcaptcha_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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 items
  • 14× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WPCaptcha' not found in wp-content/plugins/advanced-google-recaptcha/interface/tab_temp_access.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WPCaptcha' not found in wp-content/plugins/advanced-google-recaptcha/interface/tab_login_form.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WPCaptcha' not found in wp-content/plugins/advanced-google-recaptcha/interface/tab_captcha.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WPCaptcha' not found in wp-content/plugins/advanced-google-recaptcha/libs/stats.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WPCaptcha' not found in wp-content/plugins/advanced-google-recaptcha/interface/tab_activity.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WPCaptcha' not found in wp-content/plugins/advanced-google-recaptcha/libs/ajax.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WPCaptcha' not found in wp-content/plugins/advanced-google-recaptcha/interface/tab_firewall.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WPCaptcha' not found in wp-content/plugins/advanced-google-recaptcha/libs/setup.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WPCaptcha' not found in wp-content/plugins/advanced-google-recaptcha/interface/tab_geoip.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WPCaptcha' not found in wp-content/plugins/advanced-google-recaptcha/interface/tab_design.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
Please take inspiration from this readme.txt

advanced-google-recaptcha/advanced-google-recaptcha.php 77% from 13 tests

"Advanced Google reCAPTCHA" version 1.15's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.9" instead of "4.0")
  • Requires PHP: The required version number must match the one declared in readme.txt ("5.6" instead of "5.2")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 213 characters long)

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 detected8,531 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP187264863,869
CSS5464353,044
JavaScript8164501,541
SVG10077

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity27.88
▷ Minimum class complexity1.00
▷ Maximum class complexity152.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity48.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods112
▷ Static methods10593.75%
▷ Public methods112100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions00.00%
▷ Anonymous functions4100.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
29 PNG files occupy 0.65MB with 0.39MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/wp-301-logo.png1.57KB1.49KB▼ 4.68%
images/sort_both.png2.85KB0.19KB▼ 93.48%
wf-flyout/icons/wp-captcha.png21.34KB1.97KB▼ 90.78%
images/captcha_recaptcha_v2.png27.84KB5.50KB▼ 80.24%
images/image.png0.59KB0.41KB▼ 29.67%