84% voila-contact-form

Code Review | Voila Contact Form

WordPress plugin Voila Contact Form scored84%from 54 tests.

About plugin

  • Plugin page: voila-contact-form
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.3
  • WordPress version: 6.3.1
  • First release: Aug 29, 2019
  • Latest release: Nov 24, 2019
  • Number of updates: 12
  • Update frequency: every 21.7 days
  • Top authors: benjibabs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.29ms] Passed 4 tests

This is a short check of server-side resources used by Voila Contact Form
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.38 ▲2.80
Dashboard /wp-admin3.34 ▲0.0346.61 ▼0.45
Posts /wp-admin/edit.php3.39 ▲0.0347.71 ▼3.40
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.57 ▼10.64
Media Library /wp-admin/upload.php3.26 ▲0.0334.78 ▲1.32
Add New /wp-admin/post-new.php?post_type=cfmessage3.3744.90
Voila Contact Form Messages /wp-admin/edit.php?post_type=cfmessage3.3033.02

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 21 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
ict101s_contact_form_op_array
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Voila Contact Form
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲10214.79 ▲0.502.00 ▲0.4043.17 ▲2.73
Dashboard /wp-admin2,246 ▲554.86 ▼0.06102.66 ▲1.3843.71 ▼1.54
Posts /wp-admin/edit.php2,132 ▲431.98 ▼0.0533.75 ▼8.0434.70 ▼3.16
Add New Post /wp-admin/post-new.php1,569 ▲2723.37 ▲5.19687.08 ▲79.2862.16 ▲6.37
Media Library /wp-admin/upload.php1,434 ▲464.20 ▼0.0194.57 ▼18.0741.28 ▼1.55
Add New /wp-admin/post-new.php?post_type=cfmessage2,2767.62181.9866.14
Voila Contact Form Messages /wp-admin/edit.php?post_type=cfmessage1,1331.9731.2727.63

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/voila-contact-form/ict101s-contact-form.php:49

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: contact, voila, simple, easy, instant...

voila-contact-form/ict101s-contact-form.php 85% from 13 tests

The primary PHP file in "Voila Contact Form" version 1.0.0 is used by WordPress to initiate all plugin functionality
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 ("voila-contact-form.php" instead of "ict101s-contact-form.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
Everything looks great! No dangerous files found in this plugin563 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP860254377
PO File27086166
CSS13020

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity6.50
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes6
▷ Abstract classes6100.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods22
▷ Static methods22100.00%
▷ Public methods1359.09%
▷ Protected methods00.00%
▷ Private methods940.91%
Functions0
▷ Named functions00.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
3 PNG files occupy 0.10MB with 0.05MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png30.73KB14.63KB▼ 52.37%
assets/screenshot-1.png48.95KB24.64KB▼ 49.66%
assets/screenshot-3.png18.16KB9.44KB▼ 48.02%