88% advanced-google-recaptcha

Code Review | Advanced Google reCAPTCHA

WordPress plugin Advanced Google reCAPTCHA scored 88% from 54 tests.

About plugin

  • Plugin page: advanced-google-r...
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 5.9.2
  • First release: Mar 11, 2021
  • Latest release: Feb 2, 2022
  • Number of updates: 19
  • Update frequency: every 17.3 days
  • Top authors: wpconcern (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active / 1,751 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼293.84ms] Passed 4 tests

Analyzing server-side resources used by Advanced Google reCAPTCHA
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0254.06 ▲5.46
Dashboard /wp-admin3.44 ▲0.0333.26 ▼0.28
Posts /wp-admin/edit.php3.66 ▲0.0237.22 ▲0.31
Add New Post /wp-admin/post-new.php6.90 ▼0.0792.73 ▼1,175.58
Media Library /wp-admin/upload.php3.31 ▲0.0226.37 ▲0.20

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 62 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Advanced Google reCAPTCHA: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,796 ▲7416.00 ▲0.215.69 ▼0.142.41 ▲0.07
Dashboard /wp-admin2,925 ▲676.14 ▼0.02119.10 ▼28.36161.73 ▼4.90
Posts /wp-admin/edit.php2,724 ▲333.24 ▲0.0165.22 ▲1.71134.72 ▼10.69
Add New Post /wp-admin/post-new.php1,773 ▲5621.00 ▼0.35433.10 ▼22.05158.30 ▼10.54
Media Library /wp-admin/upload.php1,731 ▲305.54 ▲0.00144.67 ▲5.80188.62 ▲3.60

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% 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 take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/advanced-google-recaptcha/vendor/google/recaptcha/examples/index.php
  • 24× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/advanced-google-recaptcha/vendor/google/recaptcha/tests/ReCaptcha/ResponseTest.php:39
    • > PHP Fatal error
      Uncaught Error: Interface 'ReCaptcha\\RequestMethod' not found in wp-content/plugins/advanced-google-recaptcha/vendor/google/recaptcha/src/ReCaptcha/RequestMethod/SocketPost.php:46
    • > PHP Warning
      require_once(wp-content/plugins/advanced-google-recaptcha/vendor/google/recaptcha/examples/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/advanced-google-recaptcha/vendor/google/recaptcha/examples/recaptcha-v3-verify.php on line 38
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/advanced-google-recaptcha/vendor/google/recaptcha/examples/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/advanced-google-recaptcha/vendor/google/recaptcha/examples/recaptcha-content-security-policy.php on line 38
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/advanced-google-recaptcha/vendor/google/recaptcha/examples/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/advanced-google-recaptcha/vendor/google/recaptcha/examples/recaptcha-v3-verify.php on line 38
    • > PHP Warning
      require_once(wp-content/plugins/advanced-google-recaptcha/vendor/google/recaptcha/examples/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/advanced-google-recaptcha/vendor/google/recaptcha/examples/recaptcha-v3-request-scores.php on line 38
    • > PHP Warning
      require_once(wp-content/plugins/advanced-google-recaptcha/vendor/google/recaptcha/examples/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/advanced-google-recaptcha/vendor/google/recaptcha/examples/recaptcha-v2-invisible.php on line 38
    • > PHP Fatal error
      Uncaught Error: Interface 'ReCaptcha\\RequestMethod' not found in wp-content/plugins/advanced-google-recaptcha/vendor/google/recaptcha/src/ReCaptcha/RequestMethod/CurlPost.php:46
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/advanced-google-recaptcha/vendor/google/recaptcha/examples/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/advanced-google-recaptcha/vendor/google/recaptcha/examples/recaptcha-v3-request-scores.php on line 38
    • > PHP Warning
      require_once(wp-content/plugins/advanced-google-recaptcha/vendor/google/recaptcha/examples/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/advanced-google-recaptcha/vendor/google/recaptcha/examples/recaptcha-v2-checkbox-explicit.php on line 38

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: You are using too many tags: 16 tag instead of maximum 10
The official readme.txt might help

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

The main PHP script in "Advanced Google reCAPTCHA" version 1.0.4 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 213 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin3,103 lines of code in 56 files:
LanguageFilesBlank linesComment linesLines of code
PHP395551,9312,632
Markdown3560197
CSS5140114
JSON20095
JavaScript49338
XML10020
YAML1206
HTML1001

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 problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity8.26
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.13
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces1
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods125
▷ Static methods1915.20%
▷ Public methods12096.00%
▷ Protected methods21.60%
▷ Private methods32.40%
Functions46
▷ Named functions4393.48%
▷ Anonymous functions36.52%
Constants18
▷ Global constants633.33%
▷ Class constants1266.67%
▷ Public constants12100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin