74% contact-form-123

Code Review | Contact Form 123

WordPress plugin Contact Form 123 scored74%from 54 tests.

About plugin

  • Plugin page: contact-form-123
  • Plugin version: 1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 16, 2021
  • Latest release: Mar 25, 2023
  • Number of updates: 10
  • Update frequency: every 76.7 days
  • Top authors: aleksandrposs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /597 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼1.24MB] [CPU: ▼42.30ms] Passed 4 tests

An overview of server-side resources used by Contact Form 123
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.73 ▼0.7312.52 ▼26.37
Dashboard /wp-admin2.77 ▼0.5319.20 ▼30.50
Posts /wp-admin/edit.php2.77 ▼0.5916.00 ▼30.64
Add New Post /wp-admin/post-new.php2.77 ▼3.1216.20 ▼81.70
Media Library /wp-admin/upload.php2.77 ▼0.4615.13 ▼20.52

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: 1 new table, 6 new options
New tables
wp_plugin_contact_form_123_settings
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Contact Form 123
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲2514.24 ▲0.101.71 ▼0.1839.45 ▼4.48
Dashboard /wp-admin2,215 ▲355.51 ▼0.1495.32 ▼0.5267.80 ▲28.12
Posts /wp-admin/edit.php2,126 ▲261.99 ▼0.1236.34 ▼2.7733.04 ▼1.88
Add New Post /wp-admin/post-new.php1,558 ▲2323.14 ▼0.14749.45 ▲105.7352.18 ▲1.11
Media Library /wp-admin/upload.php1,420 ▲204.17 ▼0.02102.88 ▼3.9180.77 ▲37.19

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/contact-form-123/index.php+56
    Undefined index: page
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

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
Good news, no errors were detected

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 fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact-form-123/index.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === contact-form-123 === )
Please take inspiration from this readme.txt

contact-form-123/index.php 92% from 13 tests

The principal PHP file in "Contact Form 123" v. 1.8 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("contact-form-123.php" instead of "index.php")

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
No dangerous file extensions were detected351 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP16311194
CSS1257157

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.43
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected