74% captcha-bank

Code Review | WordPress Captcha Plugin by Captcha Bank

WordPress plugin WordPress Captcha Plugin by Captcha Bank scored74%from 54 tests.

About plugin

  • Plugin page: captcha-bank
  • Plugin version: 4.0.36
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.7
  • WordPress version: 6.3.1
  • First release: Sep 23, 2013
  • Latest release: Mar 13, 2021
  • Number of updates: 367
  • Update frequency: every 7.4 days
  • Top authors: contact-banker (100%)

Code review

54 tests

User reviews

109 reviews

Install metrics

8,000+ active /447,606 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by WordPress Captcha Plugin by Captcha Bank
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0742.55 ▲4.67
Dashboard /wp-admin3.38 ▲0.0856.26 ▲4.09
Posts /wp-admin/edit.php3.50 ▲0.1452.07 ▼2.38
Add New Post /wp-admin/post-new.php5.96 ▲0.0799.80 ▼11.04
Media Library /wp-admin/upload.php3.31 ▲0.0849.29 ▲14.86
Wizard /wp-admin/admin.php?page=captcha_bank3.6339.71
Blockage Settings /wp-admin/admin.php?page=captcha_bank_blockage_settings3.2843.41
/wp-admin/admin.php?page=captcha_bank_message_settings3.2837.48
/wp-admin/admin.php?page=captcha_bank_roles_capabilities3.2837.20
Whitelist IP Address / Range /wp-admin/admin.php?page=captcha_bank_whitelist_ip_addresses3.2837.79
/wp-admin/admin.php?page=captcha_bank_email_templates3.2837.83
/wp-admin/admin.php?page=captcha_bank_wizard3.2935.91
Other Settings /wp-admin/admin.php?page=captcha_bank_other_settings3.2837.41
Block / Unblock Countries /wp-admin/admin.php?page=captcha_bank_block_unblock_countries3.2836.42
System Information /wp-admin/admin.php?page=captcha_bank_system_information3.2839.42

Server storage [IO: ▲2.40MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 121 new files
Database: 3 new tables, 8 new options
New tables
wp_captcha_bank_meta
wp_captcha_bank_ip_locations
wp_captcha_bank
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
cpb_admin_notice
captcha-bank-version-number
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for WordPress Captcha Plugin by Captcha Bank
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,925 ▲19013.62 ▼0.655.71 ▲4.0044.61 ▲6.04
Dashboard /wp-admin2,208 ▲325.79 ▲0.90107.37 ▼98.4991.51 ▲23.88
Posts /wp-admin/edit.php2,106 ▲202.01 ▼0.0037.74 ▼0.5537.53 ▲4.56
Add New Post /wp-admin/post-new.php1,536 ▲123.22 ▲0.17793.12 ▲145.6669.73 ▲19.36
Media Library /wp-admin/upload.php1,399 ▲84.21 ▼0.00121.34 ▲22.7979.54 ▲32.44
Wizard /wp-admin/admin.php?page=captcha_bank1,0333.0467.0244.43
Blockage Settings /wp-admin/admin.php?page=captcha_bank_blockage_settings1,0363.0069.7734.44
/wp-admin/admin.php?page=captcha_bank_message_settings1,0363.0141.3837.58
/wp-admin/admin.php?page=captcha_bank_roles_capabilities1,0333.0240.4435.10
Whitelist IP Address / Range /wp-admin/admin.php?page=captcha_bank_whitelist_ip_addresses1,0333.0738.0535.03
/wp-admin/admin.php?page=captcha_bank_email_templates1,0333.0139.4434.96
/wp-admin/admin.php?page=captcha_bank_wizard9973.0243.7234.77
Other Settings /wp-admin/admin.php?page=captcha_bank_other_settings1,0363.0138.9435.74
Block / Unblock Countries /wp-admin/admin.php?page=captcha_bank_block_unblock_countries9993.0441.7334.13
System Information /wp-admin/admin.php?page=captcha_bank_system_information1,0363.0240.0035.40

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 3 tables in the database
    • wp_captcha_bank_ip_locations
    • wp_captcha_bank_meta
    • wp_captcha_bank
  • This plugin does not fully uninstall, leaving 8 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • cpb_admin_notice
    • captcha-bank-version-number

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
The SRP test was a success

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=captcha_bank_system_information
    • > Console-api (warning) in unknown
    http://maps.googleapis.com/maps/api/js?v=3&libraries=places&key=AIzaSyC4rVG7IsNk9pKUO_uOZuxQO4FmF6z03Ks&ver=6.3.1 334:267 "Google Maps JavaScript API has been loaded directly without a callback. This is not supported and can lead to race conditions and suboptimal performance. For supported loading patterns please see https://goo.gle/js-api-loading"

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
5 plugin tags: anti spam, recaptcha, text captcha, google captcha, captcha

captcha-bank/captcha-bank.php Passed 13 tests

The entry point to "WordPress Captcha Plugin by Captcha Bank" version 4.0.36 is a PHP file that has certain tags in its header comment area
89 characters long description:
This plugin allows you to implement security captcha form into web forms to prevent spam.

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 detected35,350 lines of code in 69 files:
LanguageFilesBlank linesComment linesLines of code
PHP364601,09517,677
JavaScript111606,142
CSS16251275,727
PO File41,7082,0994,363
SVG2001,441

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.37
Average class complexity14.83
▷ Minimum class complexity1.00
▷ Maximum class complexity45.00
Average method complexity4.46
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions99
▷ Named functions99100.00%
▷ Anonymous functions00.00%
Constants20
▷ Global constants20100.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
35 compressed PNG files occupy 0.05MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/images/ui-icons_228ef1_256x240.png4.44KB4.17KB▼ 6.02%
assets/global/img/portlet-collapse-icon-white.png0.23KB0.25KB0.00%
assets/admin/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%
assets/global/plugins/datatables/media/images/sort_desc_disabled.png0.14KB0.25KB0.00%
assets/admin/images/ui-icons_ef8c08_256x240.png4.44KB4.17KB▼ 6.02%