83% wp-forms-puzzle-captcha

Code Review | WP Forms Puzzle Captcha

WordPress plugin WP Forms Puzzle Captcha scored83%from 54 tests.

About plugin

  • Plugin page: wp-forms-puzzle-c...
  • Plugin version: 4.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.2
  • WordPress version: 6.3.1
  • First release: Jun 18, 2020
  • Latest release: Apr 22, 2023
  • Number of updates: 14
  • Update frequency: every 74.3 days
  • Top authors: rnitinb (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

7,000+ active /18,652 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
This plugin's installer ran successfully

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

This is a short check of server-side resources used by WP Forms Puzzle Captcha
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.60 ▼4.02
Dashboard /wp-admin3.33 ▲0.0346.62 ▼6.86
Posts /wp-admin/edit.php3.44 ▲0.0951.47 ▲2.98
Add New Post /wp-admin/post-new.php5.93 ▲0.0493.82 ▼2.90
Media Library /wp-admin/upload.php3.25 ▲0.0236.90 ▼1.46

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
WFPC_check_welcome
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for WP Forms Puzzle Captcha
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,854 ▲11913.25 ▼1.132.09 ▲0.0541.60 ▼2.36
Dashboard /wp-admin2,226 ▲384.87 ▼1.02113.74 ▲0.7240.84 ▼8.90
Posts /wp-admin/edit.php2,109 ▲202.02 ▲0.0138.87 ▲1.5935.08 ▲0.57
Add New Post /wp-admin/post-new.php1,531 ▲1717.52 ▼0.02601.45 ▼88.1061.79 ▲6.42
Media Library /wp-admin/upload.php1,408 ▲234.32 ▲0.1194.00 ▼14.4841.07 ▼7.19

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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 following issues need your attention
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wp-forms-puzzle-captcha/includes/admin/tabs/wfpc-login.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wp-forms-puzzle-captcha/includes/admin/tabs/wfpc-lost-password.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wp-forms-puzzle-captcha/includes/admin/tabs/wfpc-register.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wp-forms-puzzle-captcha/includes/admin/tabs/wfpc-cf7.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wp-forms-puzzle-captcha/includes/admin/tabs/wfpc-intro.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wp-forms-puzzle-captcha/includes/admin/tabs/wfpc-comment.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-forms-puzzle-captcha/includes/functions.php:190

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: anti-spam security, contact form 7 puzzle captcha field, comment form, comment captcha, antispam...

wp-forms-puzzle-captcha/wp-forms-puzzle-captcha.php 77% from 13 tests

The main PHP script in "WP Forms Puzzle Captcha" version 4.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 179 characters long)
  • Domain Path: The domain path folder does not exist ("/languages/")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
There were no executable files found in this plugin1,249 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP1188173685
JavaScript3304337
CSS2380227

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity16.00
▷ Minimum class complexity12.00
▷ Maximum class complexity20.00
Average method complexity2.58
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions555.56%
▷ Anonymous functions444.44%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.07MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/Pic0.png1.31KB1.17KB▼ 11.24%
assets/images/Pic1.png1.33KB1.17KB▼ 12.34%
assets/images/Pic2.png1.33KB1.17KB▼ 12.34%
assets/screen-shots/add-puzzle-captcha-to-cf7-1.png36.99KB15.43KB▼ 58.27%
assets/screen-shots/add-puzzle-captcha-to-cf7-2.png30.89KB12.51KB▼ 59.48%