77% contact-form-lite

Code Review | Contact Form Plugin

WordPress plugin Contact Form Plugin scored77%from 54 tests.

About plugin

  • Plugin page: contact-form-lite
  • Plugin version: 1.1.23
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.3
  • WordPress version: 6.3.1
  • First release: Apr 5, 2015
  • Latest release: Aug 9, 2023
  • Number of updates: 311
  • Update frequency: every 9.8 days
  • Top authors: GhozyLab (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

4,000+ active /944,994 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.59MB] [CPU: ▲2.87ms] 75% from 4 tests

A check of server-side resources used by Contact Form Plugin
It is recommended to improve the following
  • CPU: Try to keep total CPU usage under 500.00ms (currently 1,110.85ms on /wp-admin/edit.php?post_type=easycontactform&page=ecf-addons)
PageMemory (MB)CPU Time (ms)
Home /3.89 ▲0.4247.02 ▲4.14
Dashboard /wp-admin3.99 ▲0.6955.47 ▲1.67
Posts /wp-admin/edit.php4.04 ▲0.6858.20 ▲11.30
Add New Post /wp-admin/post-new.php6.53 ▲0.6598.60 ▼5.65
Media Library /wp-admin/upload.php3.85 ▲0.6248.75 ▲11.73
Free Install Plugins /wp-admin/edit.php?post_type=easycontactform&page=ecf-free-plugins3.94533.34
Premium Plugins /wp-admin/edit.php?post_type=easycontactform&page=ecf-premium-plugins3.911,396.42
Easy Contact Form Lite Changelog /wp-admin/edit.php?post_type=easycontactform&page=ecf-changelog3.8737.15
Add New Form /wp-admin/post-new.php?post_type=easycontactform4.0760.14
UPGRADE to PRO /wp-admin/edit.php?post_type=easycontactform&page=easycform_comparison3.8349.35
Free Themes /wp-admin/edit.php?post_type=easycontactform&page=ecf-free-themes3.92585.70
Forms /wp-admin/edit.php?post_type=easycontactform3.8947.62
Addons /wp-admin/edit.php?post_type=easycontactform&page=ecf-addons3.921,110.85
Getting started with Easy Contact Form Lite /wp-admin/edit.php?post_type=easycontactform&page=ecf-getting-started3.8239.75
Global Settings /wp-admin/edit.php?post_type=easycontactform&page=ecf_settings_page3.8253.75

Server storage [IO: ▲2.77MB] [DB: ▲0.03MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 179 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_ecf-widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Contact Form Plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,964 ▲20313.60 ▼0.698.48 ▲6.8237.09 ▼3.80
Dashboard /wp-admin2,266 ▲895.62 ▲0.0190.85 ▼0.3265.48 ▲21.94
Posts /wp-admin/edit.php2,171 ▲742.08 ▲0.0739.10 ▲0.8538.10 ▲1.29
Add New Post /wp-admin/post-new.php6,361 ▲4,81418.83 ▼4.38934.26 ▲231.54115.11 ▲65.60
Media Library /wp-admin/upload.php1,459 ▲564.16 ▼0.07100.45 ▼11.5187.94 ▲39.79
Free Install Plugins /wp-admin/edit.php?post_type=easycontactform&page=ecf-free-plugins1,4822.3928.6454.03
Premium Plugins /wp-admin/edit.php?post_type=easycontactform&page=ecf-premium-plugins1,0162.3633.3866.08
Easy Contact Form Lite Changelog /wp-admin/edit.php?post_type=easycontactform&page=ecf-changelog2,2311.7224.2152.00
Add New Form /wp-admin/post-new.php?post_type=easycontactform4,2829.57223.32213.63
UPGRADE to PRO /wp-admin/edit.php?post_type=easycontactform&page=easycform_comparison1,7171.8429.0854.22
Free Themes /wp-admin/edit.php?post_type=easycontactform&page=ecf-free-themes9392.1027.0944.47
Forms /wp-admin/edit.php?post_type=easycontactform1,1321.9538.1233.08
Addons /wp-admin/edit.php?post_type=easycontactform&page=ecf-addons1,0932.3734.1270.23
Getting started with Easy Contact Form Lite /wp-admin/edit.php?post_type=easycontactform&page=ecf-getting-started1,4909.63277.5381.80
Global Settings /wp-admin/edit.php?post_type=easycontactform&page=ecf_settings_page9071.7625.2830.82

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

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/contact-form-lite/inc/ecf-shortcode.php
    • > /wp-content/plugins/contact-form-lite/inc/tinymce_plugin/register_mce_button.php
    • > /wp-content/plugins/contact-form-lite/inc/ecf-template.php
    • > /wp-content/plugins/contact-form-lite/easy-contact-form.php
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact-form-lite/inc/ecf-metaboxes.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact-form-lite/inc/ecf-tinymce.php:43
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/contact-form-lite/inc/ecf-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact-form-lite/inc/ecf-frontend.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

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

The principal PHP file in "Contact Form Plugin" v. 1.1.23 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 349 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("contact-form-lite.php" instead of "easy-contact-form.php")

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
Everything looks great! No dangerous files found in this plugin17,816 lines of code in 77 files:
LanguageFilesBlank linesComment linesLines of code
PO File101,8481,9625,563
JavaScript236915954,610
PHP221,3925104,308
CSS204031282,633
SVG200702

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity10.67
▷ Minimum class complexity6.00
▷ Maximum class complexity20.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions87
▷ Named functions8698.85%
▷ Anonymous functions11.15%
Constants16
▷ Global constants16100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
68 PNG files occupy 0.71MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/images/colorpicker/colorpicker_rgb_g.png1.04KB0.83KB▼ 20.21%
inc/images/colorpicker/custom_rgb_g.png1.04KB0.80KB▼ 23.67%
inc/images/switch-background.png4.83KB1.76KB▼ 63.50%
inc/images/colorpicker/custom_submit.png0.97KB0.99KB0.00%
inc/images/colorpicker/custom_hsb_h.png0.95KB0.73KB▼ 23.40%