90% contact-form-zero

Code Review | Contact Form Zero

WordPress plugin Contact Form Zero scored90%from 54 tests.

About plugin

  • Plugin page: contact-form-zero
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: May 20, 2020
  • Latest release: Aug 19, 2023
  • Number of updates: 19
  • Update frequency: every 62.4 days
  • Top authors: bhadaway (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /807 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.70ms] Passed 4 tests

A check of server-side resources used by Contact Form Zero
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.56 ▼7.82
Dashboard /wp-admin3.31 ▲0.0049.90 ▼0.05
Posts /wp-admin/edit.php3.36 ▲0.0045.93 ▼5.03
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.68 ▼10.52
Media Library /wp-admin/upload.php3.23 ▲0.0034.88 ▼3.41

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Contact Form Zero
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.23 ▲0.121.84 ▲0.1741.67 ▼2.77
Dashboard /wp-admin2,192 ▲155.47 ▼0.1490.06 ▼1.4837.76 ▼7.30
Posts /wp-admin/edit.php2,100 ▼31.97 ▼0.0138.18 ▼3.3735.17 ▼2.92
Add New Post /wp-admin/post-new.php1,526 ▼1123.01 ▲4.67630.31 ▼1.1053.98 ▼11.57
Media Library /wp-admin/upload.php1,403 ▲64.20 ▲0.05101.32 ▲1.5144.13 ▼1.49

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: anti-spam, feedback, contact form, widget, quote...

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

The entry point to "Contact Form Zero" version 1.1 is a PHP file that has certain tags in its header comment area
108 characters long description:
Add a stupidly simple and lightweight contact form to your website with this shortcode: [contact-form-zero].

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected91 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP122491

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin