84% omni-contact-form

Code Review | Omni Contact Form

WordPress plugin Omni Contact Form scored84%from 54 tests.

About plugin

  • Plugin page: omni-contact-form
  • Plugin version: 0.4.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.9-5.7
  • WordPress version: 6.3.1
  • First release: Jul 25, 2019
  • Latest release: Apr 9, 2021
  • Number of updates: 7
  • Update frequency: every 89.1 days
  • Top authors: demetris (71.43%)deployer (42.86%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /856 total downloads

Benchmarks

Plugin footprint 83% 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.00MB] [CPU: ▼8.54ms] Passed 4 tests

This is a short check of server-side resources used by Omni Contact Form
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0243.63 ▲4.30
Dashboard /wp-admin3.32 ▼0.0344.47 ▼12.16
Posts /wp-admin/edit.php3.37 ▲0.0145.01 ▼1.38
Add New Post /wp-admin/post-new.php5.90 ▲0.0281.14 ▼18.36
Media Library /wp-admin/upload.php3.24 ▲0.0132.42 ▼2.24

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Omni Contact Form
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.30 ▼0.082.20 ▲0.6550.54 ▲10.39
Dashboard /wp-admin2,195 ▲155.65 ▼0.0285.39 ▼0.6538.76 ▼2.84
Posts /wp-admin/edit.php2,100 ▼31.98 ▼0.0336.19 ▼1.4536.78 ▼0.21
Add New Post /wp-admin/post-new.php1,536 ▲823.03 ▲0.00606.15 ▼58.5760.01 ▲8.23
Media Library /wp-admin/upload.php1,400 ▼04.22 ▼0.0594.17 ▼3.3441.92 ▼4.15

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function OmniContactForm\\plugin_dir_path() in wp-content/plugins/omni-contact-form/omni-contact-form.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Stable tag: Empty string
You can take inspiration from this readme.txt

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

Analyzing the main PHP file in "Omni Contact Form" version 0.4.5
52 characters long description:
A simple contact form with simple shortcode settings

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin1,476 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP7168380506
CSS3470270
JavaScript329123195
Sass3496149
Markdown21100146
TypeScript14988141
XML112146
JSON20023

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity11.50
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity3.52
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods2083.33%
▷ Protected methods00.00%
▷ Private methods416.67%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin