89% toms-recaptcha

Code Review | TomS reCAPTCHA

WordPress plugin TomS reCAPTCHA scored89%from 54 tests.

About plugin

  • Plugin page: toms-recaptcha
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.2
  • WordPress version: 6.3.1
  • First release: Jan 6, 2022
  • Latest release: Mar 29, 2023
  • Number of updates: 15
  • Update frequency: every 29.8 days
  • Top authors: tomsneddon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

600+ active /7,044 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.68MB] [CPU: ▲1.42ms] Passed 4 tests

A check of server-side resources used by TomS reCAPTCHA
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.13 ▲0.6739.78 ▲1.47
Dashboard /wp-admin4.04 ▲0.7351.20 ▲3.69
Posts /wp-admin/edit.php4.09 ▲0.7353.74 ▲8.19
Add New Post /wp-admin/post-new.php6.55 ▲0.66100.10 ▼6.64
Media Library /wp-admin/upload.php3.90 ▲0.6743.63 ▲7.15
Dashboard /wp-admin/admin.php?page=toms-wp3.8737.85
TomS reCAPTCHA /wp-admin/admin.php?page=toms-recaptcha-settings3.8649.40

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 41 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for TomS reCAPTCHA
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,925 ▲19013.14 ▼1.165.00 ▲3.4039.44 ▼5.99
Dashboard /wp-admin2,300 ▲1125.84 ▲0.93105.05 ▼7.2240.76 ▼6.63
Posts /wp-admin/edit.php2,196 ▲1072.15 ▲0.1440.22 ▼6.5335.54 ▲0.21
Add New Post /wp-admin/post-new.php1,562 ▲2923.42 ▲0.20674.44 ▲80.8054.48 ▼7.35
Media Library /wp-admin/upload.php1,485 ▲974.32 ▲0.15102.14 ▲3.3043.92 ▲1.92
Dashboard /wp-admin/admin.php?page=toms-wp1,1782.0728.0949.02
TomS reCAPTCHA /wp-admin/admin.php?page=toms-recaptcha-settings1,6201.6927.8541.56

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Tags: There are too many tags (17 tag instead of maximum 10)
The official readme.txt might help

toms-recaptcha/toms-recaptcha.php 85% from 13 tests

"TomS reCAPTCHA" version 1.2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 163 characters long)
  • Requires PHP: The required version number did not match the one declared in readme.txt ("7.4" instead of "7.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected3,589 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP84694592,574
CSS5227433
PO File280109239
SVG211191
JSON200152

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity105.17
▷ Minimum class complexity35.00
▷ Maximum class complexity203.00
Average method complexity8.73
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods84
▷ Static methods00.00%
▷ Public methods8398.81%
▷ Protected methods00.00%
▷ Private methods11.19%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
13 PNG files occupy 0.09MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/assets/img/toms-social-login.png6.14KB4.15KB▼ 32.34%
inc/assets/img/reCAPTCHAv3.png10.77KB3.07KB▼ 71.48%
vendor/assets/img/toms-recaptcha.png13.43KB3.27KB▼ 75.67%
vendor/assets/img/toms-video-player.png8.10KB3.04KB▼ 62.51%
vendor/assets/img/toms-pretty-list.png5.48KB3.30KB▼ 39.77%