79% wprecaptcha

Code Review | WP reCaptcha

WordPress plugin WP reCaptcha scored79%from 54 tests.

About plugin

  • Plugin page: wprecaptcha
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 6.3.1
  • First release: Oct 7, 2019
  • Latest release: Jul 12, 2021
  • Number of updates: 12
  • Update frequency: every 53.7 days
  • Top authors: wprecaptcha (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /2,948 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼1.01MB] [CPU: ▼44.30ms] Passed 4 tests

This is a short check of server-side resources used by WP reCaptcha
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.96 ▼0.5016.18 ▼23.72
Dashboard /wp-admin3.01 ▼0.2919.83 ▼35.29
Posts /wp-admin/edit.php3.01 ▼0.3519.56 ▼35.31
Add New Post /wp-admin/post-new.php3.01 ▼2.8817.21 ▼82.89
Media Library /wp-admin/upload.php3.01 ▼0.2216.45 ▼21.08

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 30 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
ptmgh_wp_recaptcha_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP reCaptcha
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,859 ▲9814.42 ▲0.071.69 ▼0.0543.85 ▼3.05
Dashboard /wp-admin2,268 ▲885.83 ▲0.2286.68 ▼7.1684.83 ▲43.81
Posts /wp-admin/edit.php2,171 ▲712.22 ▲0.2238.22 ▼0.9640.86 ▲6.46
Add New Post /wp-admin/post-new.php1,582 ▲5423.66 ▲0.85765.68 ▲85.7040.39 ▼10.12
Media Library /wp-admin/upload.php1,467 ▲674.34 ▲0.10105.02 ▼1.9184.44 ▲40.36

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/wprecaptcha/index.php+1047
    Undefined index: register_off
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • ptmgh_wp_recaptcha_options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

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: Please reduce the number of tags, currently 15 tag instead of maximum 10
You can look at the official readme.txt

wprecaptcha/index.php 92% from 13 tests

"WP reCaptcha" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wprecaptcha.php" instead of "index.php")

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
No dangerous file extensions were detected3,546 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
CSS454821,629
PHP184451,534
JavaScript1232368
HTML11015

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity104.00
▷ Minimum class complexity104.00
▷ Maximum class complexity104.00
Average method complexity5.64
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.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
19 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/themes/smoothness/images/ui-icons_2e83ff_256x240.png4.44KB4.17KB▼ 6.02%
css/themes/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png0.32KB0.15KB▼ 54.82%
css/themes/smoothness/images/ui-bg_glass_65_ffffff_1x400.png0.20KB0.09KB▼ 57.49%
images/wpcaptcha.png1.20KB1.08KB▼ 9.92%
css/themes/smoothness/images/ui-icons_cd0a0a_256x240.png4.44KB4.17KB▼ 6.02%