78% om-contact-form

Code Review | Om Contact Form

WordPress plugin Om Contact Formscored78%from 54 tests.

About plugin

  • Plugin page: om-contact-form
  • Plugin version: 1.0.05
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6.0
  • WordPress version: 6.3.1
  • First release: Sep 10, 2015
  • Latest release: Aug 4, 2016
  • Number of updates: 44
  • Update frequency: every 7.5 days
  • Top authors: siddharthsingh91 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /1,456 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼7.69ms] Passed 4 tests

Analyzing server-side resources used by Om Contact Form
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0442.01 ▲2.26
Dashboard /wp-admin3.43 ▲0.1343.95 ▼9.10
Posts /wp-admin/edit.php3.47 ▲0.1149.84 ▼0.42
Add New Post /wp-admin/post-new.php6.14 ▲0.2681.44 ▼17.68
Media Library /wp-admin/upload.php3.37 ▲0.1434.35 ▼3.55
Om Contact /wp-admin/admin.php?page=om-contact-form-page3.2933.92
Contact Report /wp-admin/admin.php?page=om-contact-form-submenu-page3.2931.32

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 17 new files
Database: 1 new table, 7 new options
New tables
wp_om_contact_form
New WordPress options
db_upgraded
widget_theysaidso_widget
om_contact_form_db_version
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Om Contact Form
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,940 ▲17913.54 ▼1.099.83 ▲7.9745.67 ▲2.86
Dashboard /wp-admin2,238 ▲645.72 ▲0.1586.87 ▼5.2776.74 ▲36.76
Posts /wp-admin/edit.php2,140 ▲402.24 ▲0.2941.75 ▼1.8335.12 ▼4.12
Add New Post /wp-admin/post-new.php1,726 ▲20024.90 ▲1.21745.25 ▲55.7065.77 ▲12.39
Media Library /wp-admin/upload.php1,440 ▲374.24 ▲0.0695.85 ▼10.9372.32 ▲22.06
Om Contact /wp-admin/admin.php?page=om-contact-form-page9132.2430.7026.51
Contact Report /wp-admin/admin.php?page=om-contact-form-submenu-page8292.3429.7235.37

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/om-contact-form/index.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/om-contact-form/admin-menu/admin_sub_menu.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/om-contact-form/including_js_css.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/om-contact-form/shortcode.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/om-contact-form/admin-menu/admin_main_menu.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/om-contact-form/mail_function.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=om-contact-form-submenu-page
    • > Network (severe)
    wp-content/plugins/om-contact-form/css/images/ui-bg_flat_75_ffffff_40x100.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === Om Contact Form=== )
  • Screenshots: No descriptions were found for these screenshots #1, #10, #11, #12, #2, #3, #4, #5, #6, #7, #8, #9 in om-contact-form/assets to your readme.txt
The official readme.txt might help

om-contact-form/index.php 92% from 13 tests

The main file in "Om Contact Form" v. 1.0.05 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("om-contact-form.php" instead of "index.php")

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
Good job! No executable or dangerous file extensions detected1,207 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
CSS385125803
PHP72139299
JavaScript22345105

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/close.png0.57KB0.83KB0.00%
images/om_bg.png0.94KB0.09KB▼ 89.96%
images/om-contact.png0.67KB0.66KB▼ 2.17%