90% bonafidetech-google-recaptcha

Code Review | Bonafide Tech Google Recaptcha for WordPress

WordPress plugin Bonafide Tech Google Recaptcha for WordPress scored90%from 54 tests.

About plugin

  • Plugin page: bonafidetech-goog...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.2.2
  • WordPress version: 6.3.1
  • First release: Aug 5, 2019
  • Latest release: Aug 5, 2019
  • Number of updates: 3
  • Update frequency: every 16.3 days
  • Top authors: bonafidetech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /598 total downloads

Benchmarks

Plugin footprint 83% 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.01MB] [CPU: ▼3.63ms] Passed 4 tests

A check of server-side resources used by Bonafide Tech Google Recaptcha for WordPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0444.37 ▲5.90
Dashboard /wp-admin3.32 ▼0.0249.69 ▼7.65
Posts /wp-admin/edit.php3.37 ▲0.0247.19 ▲1.52
Add New Post /wp-admin/post-new.php5.92 ▲0.0481.13 ▼14.28
Media Library /wp-admin/upload.php3.24 ▲0.0239.55 ▲6.21
BFT Google reCAPTCHA for WordPress /wp-admin/options-general.php?page=bftgr-settings3.2134.34

Server storage [IO: ▲0.28MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 16 new options
New WordPress options
db_upgraded
bftgr_secret_key
bftgr_theme
bftgr_wp_registration
bftgr_error_message
widget_recent-posts
bftgr_size
widget_recent-comments
bftgr_wp_forgot_pwd
bftgr_site_key
...

Browser metrics Passed 4 tests

An overview of browser requirements for Bonafide Tech Google Recaptcha for WordPress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.27 ▼0.081.83 ▲0.0743.51 ▲3.50
Dashboard /wp-admin2,196 ▲195.59 ▲0.0291.46 ▲6.8936.21 ▼6.47
Posts /wp-admin/edit.php2,107 ▲71.99 ▼0.0339.02 ▲2.9035.27 ▼0.57
Add New Post /wp-admin/post-new.php1,531 ▲523.11 ▼0.49637.00 ▼22.3951.49 ▼6.20
Media Library /wp-admin/upload.php1,401 ▲44.28 ▲0.07108.14 ▲9.7146.26 ▲3.12
BFT Google reCAPTCHA for WordPress /wp-admin/options-general.php?page=bftgr-settings1,0792.0332.8648.50

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 16 options in the database
    • bftgr_wp_registration
    • bftgr_wp_forgot_pwd
    • bftgr_type
    • bftgr_secret_key
    • bftgr_site_key
    • bftgr_error_message
    • can_compress_scripts
    • bftgr_theme
    • widget_recent-comments
    • widget_theysaidso_widget
    • ...

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Looking good! No server-side errors or output on direct access of PHP files

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

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: captcha, google recaptcha, woocommerce, security, wordpress...

bonafidetech-google-recaptcha/index.php 92% from 13 tests

The principal PHP file in "Bonafide Tech Google Recaptcha for WordPress" v. 1.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("bonafidetech-google-recaptcha.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected904 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP8251212796
JavaScript210362
CSS29046

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity14.67
▷ Minimum class complexity3.00
▷ Maximum class complexity35.00
Average method complexity3.28
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes116.67%
Methods36
▷ Static methods822.22%
▷ Public methods3391.67%
▷ Protected methods00.00%
▷ Private methods38.33%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.25MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshots/03.png34.95KB9.59KB▼ 72.57%
screenshots/01.png80.04KB21.41KB▼ 73.25%
screenshots/04.png29.29KB8.55KB▼ 70.81%
screenshots/02.png38.66KB10.41KB▼ 73.07%
screenshots/05.png67.97KB18.34KB▼ 73.02%