84% friendly-captcha

Code Review | Friendly Captcha for WordPress

WordPress plugin Friendly Captcha for WordPress scored84%from 54 tests.

About plugin

  • Plugin page: friendly-captcha
  • Plugin version: 1.12.2
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Dec 22, 2009
  • Latest release: Nov 2, 2023
  • Number of updates: 64
  • Update frequency: every 79.1 days
  • Top authors: friendlycaptcha (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

7,000+ active /81,491 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▲2.95ms] Passed 4 tests

An overview of server-side resources used by Friendly Captcha for WordPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0345.24 ▲9.83
Dashboard /wp-admin3.37 ▲0.0748.96 ▼2.87
Posts /wp-admin/edit.php3.42 ▲0.0651.84 ▲9.26
Add New Post /wp-admin/post-new.php5.95 ▲0.0685.99 ▲0.65
Media Library /wp-admin/upload.php3.29 ▲0.0642.17 ▲4.77
Friendly Captcha /wp-admin/options-general.php?page=friendly_captcha_admin3.2837.53

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 64 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Friendly Captcha for WordPress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲4114.29 ▼0.041.95 ▼0.1146.14 ▼0.89
Dashboard /wp-admin2,219 ▲455.61 ▲0.0292.73 ▼10.6841.45 ▼5.07
Posts /wp-admin/edit.php2,128 ▲282.03 ▲0.0139.96 ▲5.2838.47 ▲1.94
Add New Post /wp-admin/post-new.php1,546 ▲1623.24 ▲0.06679.22 ▲2.9547.61 ▼5.96
Media Library /wp-admin/upload.php1,424 ▲214.24 ▲0.0495.27 ▼7.2342.54 ▼1.55
Friendly Captcha /wp-admin/options-general.php?page=friendly_captcha_admin1,4302.1725.4552.33

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please fix the following items
  • 32× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/friendly-captcha/modules/wordpress/wordpress_comments.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/friendly-captcha/modules/wordpress/wordpress_reset_password.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/friendly-captcha/modules/fluentform/fluentform.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/friendly-captcha/modules/wpum/wpum_login.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/friendly-captcha/modules/profile-builder/profile_builder_login.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/friendly-captcha/modules/profile-builder/profile_builder_register.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/friendly-captcha/modules/woocommerce/woocommerce_register.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/friendly-captcha/modules/woocommerce/woocommerce_checkout.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/friendly-captcha/public/widgets.php:54
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/friendly-captcha/modules/wpum/wpum_validate.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: elementor, block spam, captcha, antispam, recaptcha...

friendly-captcha/friendly-captcha.php 85% from 13 tests

"Friendly Captcha for WordPress" version 1.12.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path folder does not exist ("/languages")

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
There were no executable files found in this plugin2,553 lines of code in 47 files:
LanguageFilesBlank linesComment linesLines of code
PHP406052202,417
JavaScript6179123
JSON10013

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity8.33
▷ Minimum class complexity4.00
▷ Maximum class complexity15.00
Average method complexity1.66
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods67
▷ Static methods57.46%
▷ Public methods6597.01%
▷ Protected methods00.00%
▷ Private methods22.99%
Functions76
▷ Named functions7294.74%
▷ Anonymous functions45.26%
Constants3
▷ Global constants3100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/preview.png3.40KB2.30KB▼ 32.17%