78% contact-form-ready

Code Review | Contact Form

WordPress plugin Contact Form scored78%from 54 tests.

About plugin

  • Plugin page: contact-form-ready
  • Plugin version: 2.0.10
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.3
  • WordPress version: 6.3.1
  • First release: Nov 28, 2016
  • Latest release: Jan 21, 2020
  • Number of updates: 27
  • Update frequency: every 42.6 days
  • Top authors: NickDuncan (62.96%)jarekcodecabin (25.93%)stevendebeer (14.81%)abelc (7.41%)

Code review

54 tests

User reviews

24 reviews

Install metrics

1,000+ active /39,812 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.61MB] [CPU: ▲1.27ms] Passed 4 tests

A check of server-side resources used by Contact Form
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.04 ▲0.5837.05 ▼4.52
Dashboard /wp-admin3.98 ▲0.6760.06 ▲8.70
Posts /wp-admin/edit.php4.01 ▲0.6562.23 ▲11.62
Add New Post /wp-admin/post-new.php6.50 ▲0.6193.54 ▼9.97
Media Library /wp-admin/upload.php3.84 ▲0.6147.37 ▲10.87
New Contact Form /wp-admin/post-new.php?post_type=contact-forms-nd3.8247.10
All Contact Forms /wp-admin/edit.php?post_type=contact-forms-nd3.8042.35
Styling /wp-admin/edit.php?post_type=contact-forms-nd&page=wpcf-styling3.8141.65
Settings /wp-admin/edit.php?post_type=contact-forms-nd&page=wpcf-settings3.7437.96
Extensions /wp-admin/edit.php?post_type=contact-forms-nd&page=wpcf-extensions3.8142.49

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 115 new files
Database: no new tables, 11 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
wpcf_nd_settings
wpcf_nd_contact_forms
wpcf_nd_first_time
wpcf_nd_version
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
...

Browser metrics Passed 4 tests

A check of browser resources used by Contact Form
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,978 ▲21714.77 ▲0.1326.67 ▲24.8641.21 ▼3.84
Dashboard /wp-admin2,234 ▲545.67 ▼0.0284.99 ▼11.3440.48 ▼4.77
Posts /wp-admin/edit.php2,139 ▲392.01 ▼0.0240.34 ▲3.4838.18 ▲3.07
Add New Post /wp-admin/post-new.php1,713 ▲18722.89 ▲5.23629.23 ▼64.3759.02 ▲7.99
Media Library /wp-admin/upload.php1,442 ▲424.23 ▼0.0497.85 ▼26.6142.36 ▼9.49
New Contact Form /wp-admin/post-new.php?post_type=contact-forms-nd2,2003.9084.3454.26
All Contact Forms /wp-admin/edit.php?post_type=contact-forms-nd1,2512.7850.0935.02
Styling /wp-admin/edit.php?post_type=contact-forms-nd&page=wpcf-styling1,4853.1665.8336.30
Settings /wp-admin/edit.php?post_type=contact-forms-nd&page=wpcf-settings2,3723.7463.8347.65
Extensions /wp-admin/edit.php?post_type=contact-forms-nd&page=wpcf-extensions1,1362.0327.1332.06

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options were found after uninstall: 11 options
    • wpcf_nd_settings
    • wpcf_nd_contact_forms
    • widget_recent-posts
    • wpcf_nd_styling
    • widget_recent-comments
    • wpcf_nd_version
    • wpcf_nd_first_time
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=contact-forms-nd&page=wpcf-settings
    • > User notice in wp-includes/functions.php+5905
    Function WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=contact-forms-nd
    • > Notice in wp-content/plugins/contact-form-ready/contact-form-ready.php+677
    Trying to access array offset on value of type bool

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/edit.php?post_type=contact-forms-nd
    • > Network (severe)
    https://contactformready.com/apif/vote_pull.php - Failed to load resource: net::ERR_CERT_AUTHORITY_INVALID

Optimizations

Plugin configuration 97% 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
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
The official readme.txt is a good inspiration

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

The main PHP file in "Contact Form" ver. 2.0.10 adds more information about the plugin and also serves as the entry point for this plugin
84 characters long description:
The easiest to use Contact Form plugin for WordPress with a drag and drop interface.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin22,067 lines of code in 88 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript371,8652,08112,531
PHP131,0906584,033
CSS184081772,557
Sass1025231,460
PO File2241250585
HTML2150371
Markdown4920299
JSON100201
SVG118030

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity44.67
▷ Minimum class complexity1.00
▷ Maximum class complexity351.00
Average method complexity6.28
▷ Minimum method complexity1.00
▷ Maximum method complexity58.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods124
▷ Static methods43.23%
▷ Public methods10383.06%
▷ Protected methods1411.29%
▷ Private methods75.65%
Functions42
▷ Named functions4095.24%
▷ Anonymous functions24.76%
Constants28
▷ Global constants414.29%
▷ Class constants2485.71%
▷ Public constants24100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
14 PNG files occupy 0.14MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/themes/slick.png13.47KB5.64KB▼ 58.13%
images/ClickSend.png7.71KB2.59KB▼ 66.35%
images/themes/modern.png12.05KB4.68KB▼ 61.18%
images/storedsubm.png10.27KB3.79KB▼ 63.11%
images/pdf.png8.46KB2.95KB▼ 65.13%