84% contact-form-x

Code Review | Contact Form X

WordPress plugin Contact Form X scored84%from 54 tests.

About plugin

  • Plugin page: contact-form-x
  • Plugin version: 2.8
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.4
  • WordPress version: 6.3.1
  • First release: Jun 8, 2018
  • Latest release: Oct 20, 2023
  • Number of updates: 31
  • Update frequency: every 63.3 days
  • Top authors: specialk (100%)

Code review

54 tests

User reviews

28 reviews

Install metrics

400+ active /12,382 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.65MB] [CPU: ▼0.99ms] Passed 4 tests

An overview of server-side resources used by Contact Form X
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.3638.60 ▲3.26
Dashboard /wp-admin4.12 ▲0.7752.34 ▼7.56
Posts /wp-admin/edit.php4.16 ▲0.8047.12 ▲0.71
Add New Post /wp-admin/post-new.php6.63 ▲0.7482.77 ▼0.37
Media Library /wp-admin/upload.php3.98 ▲0.7440.10 ▲4.28
Contact Form X /wp-admin/options-general.php?page=contactformx3.9633.94

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 60 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
contactformx_email
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
widget_contactformx
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Contact Form X
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,964 ▲21813.75 ▼0.529.17 ▲7.5840.04 ▼3.27
Dashboard /wp-admin2,281 ▲1015.58 ▼0.0883.08 ▼5.5342.09 ▲0.68
Posts /wp-admin/edit.php2,104 ▲41.96 ▲0.0033.00 ▼3.8635.35 ▼1.77
Add New Post /wp-admin/post-new.php1,531 ▼223.32 ▲0.34675.86 ▲5.5155.38 ▼1.24
Media Library /wp-admin/upload.php1,404 ▲74.20 ▲0.03100.32 ▼11.9541.44 ▼5.34
Contact Form X /wp-admin/options-general.php?page=contactformx1,2662.2140.6753.19

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_contactformx
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Interface 'ReCaptcha\\RequestMethod' not found in wp-content/plugins/contact-form-x/lib/recaptcha/ReCaptcha/RequestMethod/CurlPost.php:46
    • > PHP Fatal error
      Uncaught Error: Interface 'ReCaptcha\\RequestMethod' not found in wp-content/plugins/contact-form-x/lib/recaptcha/ReCaptcha/RequestMethod/Post.php:44
    • > PHP Fatal error
      Uncaught Error: Interface 'ReCaptcha\\RequestMethod' not found in wp-content/plugins/contact-form-x/lib/recaptcha/ReCaptcha/RequestMethod/SocketPost.php:46

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 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
5 plugin tags: contact, ajax, feedback, contact form, email

contact-form-x/contact-form-x.php Passed 13 tests

This is the main PHP file of "Contact Form X" version 2.8, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
67 characters long description:
Displays a user-friendly contact form that your visitors will love.

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 detected3,456 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
PHP291,7657642,690
JavaScript46122411
CSS7807355

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity6.82
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces2
Interfaces1
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods58
▷ Static methods11.72%
▷ Public methods58100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions135
▷ Named functions13499.26%
▷ Anonymous functions10.74%
Constants21
▷ Global constants942.86%
▷ Class constants1257.14%
▷ Public constants12100.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 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/email-icon.png0.69KB0.69KB0.00%