10% contact-form-with-captcha

Code Review | Contact Form With Captcha

WordPress plugin Contact Form With Captcha scored10%from 54 tests.

About plugin

  • Plugin page: contact-form-with...
  • Plugin version: 1.6.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.0
  • WordPress version: 6.3.1
  • First release: Sep 27, 2011
  • Latest release: Aug 29, 2022
  • Number of updates: 120
  • Update frequency: every 33.3 days
  • Top authors: zackhasit (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

1,000+ active /89,096 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • This plugin did not install gracefully
    • > Parse error in wp-content/plugins/contact-form-with-captcha/cfwc-main.php+552
    syntax error, unexpected end of file

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.89ms] Passed 4 tests

A check of server-side resources used by Contact Form With Captcha
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.69 ▼0.97
Dashboard /wp-admin3.31 ▲0.0050.59 ▼5.05
Posts /wp-admin/edit.php3.36 ▲0.0050.41 ▼3.38
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.21 ▼14.16
Media Library /wp-admin/upload.php3.23 ▲0.0036.86 ▼0.16

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

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

Browser metrics Passed 4 tests

Contact Form With Captcha: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.36 ▼0.361.89 ▲0.1444.38 ▲1.46
Dashboard /wp-admin2,195 ▲215.57 ▼0.0995.12 ▼5.8045.10 ▲1.28
Posts /wp-admin/edit.php2,103 ▲32.03 ▲0.0438.72 ▲1.5735.30 ▼2.60
Add New Post /wp-admin/post-new.php1,526 ▼023.77 ▲0.22670.17 ▲17.9257.88 ▲4.42
Media Library /wp-admin/upload.php1,403 ▲64.21 ▲0.0096.55 ▼3.7243.39 ▼2.21

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • 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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please take a closer look at the following
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Interface 'ReCaptcha\\RequestMethod' not found in wp-content/plugins/contact-form-with-captcha/recaptcha-master/src/ReCaptcha/RequestMethod/CurlPost.php:46
    • > PHP Fatal error
      Uncaught Error: Interface 'ReCaptcha\\RequestMethod' not found in wp-content/plugins/contact-form-with-captcha/recaptcha-master/src/ReCaptcha/RequestMethod/SocketPost.php:46
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/contact-form-with-captcha/cfwc-main.php on line 552
    • > PHP Fatal error
      Uncaught Error: Interface 'ReCaptcha\\RequestMethod' not found in wp-content/plugins/contact-form-with-captcha/recaptcha-master/src/ReCaptcha/RequestMethod/Post.php:44

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
9 plugin tags: form, recaptcha, recaptcha form, contact, antispam...

contact-form-with-captcha/cfwc-main.php 85% from 13 tests

The primary PHP file in "Contact Form With Captcha" version 1.6.8 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 203 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("contact-form-with-captcha.php" instead of "cfwc-main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected946 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP11234745783
Markdown1330109
JSON10039
CSS11439
YAML1206

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity5.78
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces2
Interfaces1
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods36
▷ Static methods12.78%
▷ Public methods36100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions23
▷ Named functions2295.65%
▷ Anonymous functions14.35%
Constants12
▷ Global constants00.00%
▷ Class constants12100.00%
▷ Public constants12100.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
No PNG files were detected