90% recaptcha-js-alert

Code Review | ReCaptcha JS Alert

WordPress plugin ReCaptcha JS Alert scored90%from 54 tests.

About plugin

  • Plugin page: recaptcha-js-alert
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.3
  • WordPress version: 6.3.1
  • First release: Aug 4, 2021
  • Latest release: Aug 12, 2023
  • Number of updates: 7
  • Update frequency: every 105.4 days
  • Top authors: freemp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /320 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.29ms] Passed 4 tests

An overview of server-side resources used by ReCaptcha JS Alert
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0137.82 ▼9.80
Dashboard /wp-admin3.34 ▲0.0448.10 ▲0.63
Posts /wp-admin/edit.php3.39 ▲0.0450.14 ▲0.85
Add New Post /wp-admin/post-new.php5.94 ▲0.0696.37 ▼0.85
Media Library /wp-admin/upload.php3.26 ▲0.0436.72 ▲1.01
ReCaptcha JS Alert /wp-admin/options-general.php?page=recaptcha-js-alert-settings3.2332.77

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
recaptcha_js_alert_settings
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for ReCaptcha JS Alert
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲5413.70 ▼0.884.54 ▲2.4840.30 ▼8.54
Dashboard /wp-admin2,229 ▲415.25 ▼0.59107.37 ▼8.6638.31 ▼4.19
Posts /wp-admin/edit.php2,096 ▲42.29 ▲0.2841.91 ▲6.2237.03 ▼0.36
Add New Post /wp-admin/post-new.php1,535 ▲1323.23 ▼0.10642.74 ▼18.5636.37 ▼16.77
Media Library /wp-admin/upload.php1,415 ▲244.43 ▲0.2190.34 ▼6.6641.20 ▼2.45
ReCaptcha JS Alert /wp-admin/options-general.php?page=recaptcha-js-alert-settings1,0902.3945.1027.51

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 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 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
8 plugin tags: recaptcha, disabled, notification, warning, alert...

recaptcha-js-alert/recaptcha-js-alert.php Passed 13 tests

The main PHP file in "ReCaptcha JS Alert" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
85 characters long description:
Notify visitors of your website if JavaScript required by reCAPTCHA is being blocked.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin125 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP41312104
CSS1007
JavaScript2007
XML1007

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions112.50%
▷ Anonymous functions787.50%
Constants1
▷ Global constants1100.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
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png5.05KB3.07KB▼ 39.31%
screenshot-1.png7.34KB4.94KB▼ 32.70%
screenshot-3.png20.04KB10.52KB▼ 47.50%