84% contact-form-7-image-captcha

Code Review | Contact Form 7 Image CAPTCHA, WPForms Image CAPTCHA, Form Spam Image CAPTCHA, GDPR

WordPress plugin Contact Form 7 Image CAPTCHA, WPForms Image CAPTCHA, Form Spam Image CAPTCHA, GDPR scored84%from 54 tests.

About plugin

  • Plugin page: contact-form-7-im...
  • Plugin version: 3.3.12
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Jul 21, 2015
  • Latest release: Nov 13, 2023
  • Number of updates: 120
  • Update frequency: every 25.3 days
  • Top authors: KTC_88 (80%)hookandhook (20.83%)

Code review

54 tests

User reviews

39 reviews

Install metrics

80,000+ active /816,604 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼2.91ms] Passed 4 tests

A check of server-side resources used by Contact Form 7 Image CAPTCHA, WPForms Image CAPTCHA, Form Spam Image CAPTCHA, GDPR
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0940.95 ▲1.81
Dashboard /wp-admin3.41 ▲0.0650.19 ▼14.47
Posts /wp-admin/edit.php3.52 ▲0.1647.15 ▼1.18
Add New Post /wp-admin/post-new.php5.99 ▲0.1095.88 ▲4.21
Media Library /wp-admin/upload.php3.33 ▲0.1036.05 ▲2.20

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 53 new files
Database: 1 new table, 7 new options
New tables
wp_ai1ic
New WordPress options
widget_recent-posts
cf7ic_timestamp
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Contact Form 7 Image CAPTCHA, WPForms Image CAPTCHA, Form Spam Image CAPTCHA, GDPR
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4414.23 ▼0.111.72 ▲0.0643.51 ▲0.62
Dashboard /wp-admin2,211 ▲375.63 ▲0.0889.52 ▼10.6538.09 ▼3.76
Posts /wp-admin/edit.php2,116 ▲162.00 ▼0.0134.68 ▼5.9034.51 ▼0.53
Add New Post /wp-admin/post-new.php1,539 ▲1323.30 ▲0.05622.78 ▼74.5551.77 ▼8.35
Media Library /wp-admin/upload.php1,419 ▲224.19 ▲0.02102.64 ▲2.1839.81 ▼3.87

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/contact-form-7-image-captcha/cf7-image-captcha.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact-form-7-image-captcha/includes/module-cf7.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/contact-form-7-image-captcha/includes/module-wpforms.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: gdpr, spam, wpforms, contact form 7, captcha

contact-form-7-image-captcha/cf7-image-captcha.php 92% from 13 tests

The principal PHP file in "Contact Form 7 Image CAPTCHA, WPForms Image CAPTCHA, Form Spam Image CAPTCHA, GDPR" v. 3.3.12 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("contact-form-7-image-captcha.php" instead of "cf7-image-captcha.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin4,522 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
SVG6333,118
PO File13247409703
PHP57889450
CSS35120251

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
5 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/pro-new-icons.png5.15KB2.81KB▼ 45.33%
assets/pro-language.png3.32KB1.96KB▼ 40.84%
assets/pro-color.png5.15KB2.81KB▼ 45.33%
assets/pro-new-colors.png6.56KB3.12KB▼ 52.42%
assets/example-cf7.png11.95KB5.49KB▼ 54.05%