68% contact-form-made-easy

Code Review | Contact Form Made Easy

WordPress plugin Contact Form Made Easy scored68%from 54 tests.

About plugin

  • Plugin page: contact-form-made...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.2-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 30, 2018
  • Latest release: Jan 18, 2023
  • Number of updates: 5
  • Update frequency: every 302.2 days
  • Top authors: kabeers011 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /583 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
Install script ran successfully

Server metrics [RAM: ▼1.96MB] [CPU: ▼49.84ms] Passed 4 tests

Server-side resources used by Contact Form Made Easy
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.92 ▼35.00
Dashboard /wp-admin2.05 ▼1.265.58 ▼42.97
Posts /wp-admin/edit.php2.05 ▼1.315.04 ▼39.71
Add New Post /wp-admin/post-new.php2.05 ▼3.846.74 ▼81.67
Media Library /wp-admin/upload.php2.05 ▼1.186.88 ▼27.70
Form Users /wp-admin/admin.php?page=form_users2.055.34
Settings /wp-admin/edit.php?post_type=formcategories&page=settings2.055.49
Categories /wp-admin/edit.php?post_type=formcategories2.056.48

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 13 new files
Database: 2 new tables, 7 new options
New tables
wp_kbcf_cat
wp_kbcf_cform
New WordPress options
can_compress_scripts
wnm_db_version
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Contact Form Made Easy
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲9313.17 ▼1.271.65 ▼0.1541.07 ▼6.31
Dashboard /wp-admin2,238 ▲505.84 ▲0.85108.07 ▲4.6666.21 ▲26.86
Posts /wp-admin/edit.php2,130 ▲412.01 ▲0.0138.57 ▲3.8433.55 ▼3.24
Add New Post /wp-admin/post-new.php1,695 ▲18121.83 ▲4.30742.35 ▲107.1560.28 ▲7.85
Media Library /wp-admin/upload.php1,414 ▲234.23 ▼0.00108.14 ▲10.7174.71 ▲33.30
Form Users /wp-admin/admin.php?page=form_users7902.0122.6921.90
Settings /wp-admin/edit.php?post_type=formcategories&page=settings8042.0225.9922.17
Categories /wp-admin/edit.php?post_type=formcategories1,0841.9831.1428.50

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • wnm_db_version

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=formcategories
    • > POST request to /wp-admin/admin-ajax.php
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/edit.php?post_type=formcategories&page=settings
    • > Notice in wp-content/plugins/contact-form-made-easy/includes/settings.php+11
    Undefined offset: 0
    • > GET request to /wp-admin/edit.php?post_type=formcategories&page=settings
    • > Notice in wp-content/plugins/contact-form-made-easy/includes/settings.php+11
    Trying to access array offset on value of type null

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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/contact-form-made-easy/languages/index.php

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)
There were no browser issues found

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
3 plugin tags: contact form, contact page, contact us wordpress

contact-form-made-easy/contact-form.php 85% from 13 tests

The main PHP file in "Contact Form Made Easy" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("contact-form-made-easy.php" instead of "contact-form.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 256 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin477 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP910271462
CSS13215

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity8.33
▷ Minimum class complexity4.00
▷ Maximum class complexity16.00
Average method complexity4.67
▷ Minimum method complexity2.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/contact_icon.png18.07KB10.38KB▼ 42.56%