10% gna-google-recaptcha

Code Review | GNA Google reCAPTCHA

WordPress plugin GNA Google reCAPTCHA scored10%from 54 tests.

About plugin

  • Plugin page: gna-google-recaptcha
  • Plugin version: 0.9.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.7
  • WordPress version: 6.3.1
  • First release: Mar 16, 2016
  • Latest release: Sep 5, 2016
  • Number of updates: 29
  • Update frequency: every 9.4 days
  • Top authors: chris_dev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,524 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method GNA_GoogleRecaptcha::activate_handler() should not be called statically

Server metrics [RAM: ▲0.07MB] [CPU: ▼7.79ms] Passed 4 tests

An overview of server-side resources used by GNA Google reCAPTCHA
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0635.14 ▼7.33
Dashboard /wp-admin3.37 ▲0.0743.31 ▼5.29
Posts /wp-admin/edit.php3.49 ▲0.1348.84 ▲2.89
Add New Post /wp-admin/post-new.php5.95 ▲0.0785.18 ▼2.11
Media Library /wp-admin/upload.php3.30 ▲0.0735.11 ▼16.41

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

GNA Google reCAPTCHA: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.24 ▲0.081.55 ▼0.4240.68 ▼2.74
Dashboard /wp-admin2,224 ▲335.86 ▲0.95111.34 ▼6.8977.43 ▲29.72
Posts /wp-admin/edit.php2,107 ▲181.97 ▼0.2033.16 ▼6.4831.23 ▼2.38
Add New Post /wp-admin/post-new.php1,527 ▼123.14 ▲0.01695.88 ▲35.9456.47 ▲3.39
Media Library /wp-admin/upload.php1,403 ▲154.09 ▼0.13101.90 ▼4.4873.79 ▲31.74

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method GNA_GoogleRecaptcha::deactivate_handler() should not be called statically
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

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
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'GNA_CaptchaBase' not found in wp-content/plugins/gna-google-recaptcha/inc/gna-captcha-comment.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'GNA_CaptchaBase' not found in wp-content/plugins/gna-google-recaptcha/inc/gna-captcha-resetpw.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'GNA_CaptchaBase' not found in wp-content/plugins/gna-google-recaptcha/inc/gna-captcha-login.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'GNA_CaptchaBase' not found in wp-content/plugins/gna-google-recaptcha/inc/gna-captcha-regi.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/gna-google-recaptcha/inc/gna-google-recaptcha-config.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'GNA_GoogleRecaptcha_Admin_Menu' not found in wp-content/plugins/gna-google-recaptcha/admin/gna-google-recaptcha-admin-settings-menu.php:3

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 88% 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
Please fix the following attributes:
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Donate link: Invalid URI found ("none")
The official readme.txt is a good inspiration

gna-google-recaptcha/gna-google-recaptcha.php Passed 13 tests

This is the main PHP file of "GNA Google reCAPTCHA" version 0.9.8, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
82 characters long description:
This plugin allows you to implement Google reCAPTCHA (CAPTCHA) into your web forms

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
Success! There were no dangerous files found in this plugin519 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP1110035519

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity6.80
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity1.95
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes110.00%
▷ Concrete classes990.00%
▷ Final classes00.00%
Methods61
▷ Static methods46.56%
▷ Public methods61100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/gna_20x20.png2.98KB0.33KB▼ 88.89%