84% zervise-contact-us-form

Code Review | Zervise Contact Us Form

WordPress plugin Zervise Contact Us Form scored84%from 54 tests.

About plugin

  • Plugin page: zervise-contact-u...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.9
  • WordPress version: 6.3.1
  • First release: Sep 24, 2021
  • Latest release: Feb 3, 2022
  • Number of updates: 3
  • Update frequency: every 44.0 days
  • Top authors: zervise (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /557 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

Analyzing server-side resources used by Zervise Contact Us Form
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.42 ▼0.0530.12 ▼15.09
Dashboard /wp-admin3.34 ▼0.0147.24 ▼20.07
Posts /wp-admin/edit.php3.39 ▲0.0351.19 ▲2.49
Add New Post /wp-admin/post-new.php5.92 ▲0.0393.07 ▼6.00
Media Library /wp-admin/upload.php3.26 ▲0.0340.35 ▲2.61

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_zervise_contact_us_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Zervise Contact Us Form: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲5114.76 ▲0.232.74 ▲0.9541.98 ▼1.14
Dashboard /wp-admin2,189 ▲95.56 ▼0.0292.88 ▼7.7441.98 ▼2.14
Posts /wp-admin/edit.php2,103 ▲32.08 ▲0.0538.84 ▲3.2033.60 ▼3.62
Add New Post /wp-admin/post-new.php1,526 ▼023.75 ▲0.16680.75 ▼60.4165.46 ▲0.74
Media Library /wp-admin/upload.php1,397 ▼64.10 ▼0.11103.07 ▲0.0346.63 ▲2.56

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • widget_zervise_contact_us_widget
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/zervise-contact-us-form/includes/zervise-contact-us-class.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/zervise-contact-us-form/includes/zervise-contact-us-scripts.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: customer support, help desk, helpdesk, support, service desk...

zervise-contact-us-form/zervise-contact-us.php 92% from 13 tests

Analyzing the main PHP file in "Zervise Contact Us Form" version 1.0.0
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("zervise-contact-us-form.php" instead of "zervise-contact-us.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin531 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS13232272
JavaScript1269137
PHP32848122

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity4.75
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin