73% zu-contact

Code Review | Zu Contact

WordPress plugin Zu Contact scored73%from 54 tests.

About plugin

  • Plugin page: zu-contact
  • Plugin version: 1.1.5
  • PHP compatiblity: 7.2.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.0-5.8.3
  • WordPress version: 6.3.1
  • First release: Dec 10, 2020
  • Latest release: Jan 11, 2022
  • Number of updates: 6
  • Update frequency: every 66.3 days
  • Top authors: dmitryrudakov (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /862 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
Installer ran successfully

Server metrics [RAM: ▲0.34MB] [CPU: ▼9.26ms] Passed 4 tests

Analyzing server-side resources used by Zu Contact
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.87 ▲0.4142.21 ▼3.31
Dashboard /wp-admin3.68 ▲0.3349.48 ▼20.83
Posts /wp-admin/edit.php3.73 ▲0.3749.29 ▲1.68
Add New Post /wp-admin/post-new.php6.24 ▲0.3590.61 ▼13.61
Media Library /wp-admin/upload.php3.54 ▲0.3136.04 ▲0.71
/wp-admin/options-general.php?page=separator_moved_position3.3732.70
Zu Contact /wp-admin/options-general.php?page=zucontact-settings3.5536.65

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Zu Contact
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,998 ▲22713.65 ▼0.977.55 ▲5.6242.60 ▼2.36
Dashboard /wp-admin2,215 ▲304.84 ▼0.09101.00 ▼5.9441.05 ▼0.67
Posts /wp-admin/edit.php2,099 ▲72.03 ▼0.0237.31 ▼5.2031.40 ▼6.48
Add New Post /wp-admin/post-new.php6,200 ▲4,66719.15 ▼4.08863.90 ▲209.3063.44 ▲3.54
Media Library /wp-admin/upload.php1,392 ▲44.21 ▼0.0496.90 ▼21.0741.07 ▼7.36
/wp-admin/options-general.php?page=separator_moved_position280.440.083.79
Zu Contact /wp-admin/options-general.php?page=zucontact-settings1,24212.38263.7832.35

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/zu-contact/zu-contact.php
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'zukit_SingletonLogging' not found in wp-content/plugins/zu-contact/zukit/snippets/hub.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'zu_ContactFields' not found in wp-content/plugins/zu-contact/includes/forms/contact.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'zukit_Addon' not found in wp-content/plugins/zu-contact/zukit/zukit-blocks.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'zu_ContactFields' not found in wp-content/plugins/zu-contact/includes/forms/default.php:7
    • > PHP Warning
      Use of undefined constant HOUR_IN_SECONDS - assumed 'HOUR_IN_SECONDS' (this will throw an Error in a future version of PHP) in wp-content/plugins/zu-contact/zukit/load.php on line 102
    • > PHP Fatal error
      Uncaught Error: Class 'zu_ContactFields' not found in wp-content/plugins/zu-contact/includes/forms/booking.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'zukit_Plugin' not found in wp-content/plugins/zu-contact/includes/zucontact-plugin.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'zu_ContactFields' not found in wp-content/plugins/zu-contact/includes/forms/subscribe.php:7

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=separator_moved_position
    • > Network (severe)
    wp-admin/options-general.php?page=separator_moved_position - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: email, feedback form, contact form, contact, feedback...

zu-contact/zu-contact.php Passed 13 tests

"Zu Contact" version 1.1.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
98 characters long description:
Simple but smart and modern Ajax contact form. With Form Blocks and Gutenberg based settings page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin6,266 lines of code in 68 files:
LanguageFilesBlank linesComment linesLines of code
PHP451,0767355,399
PO File4236236639
JavaScript63930205
SVG30013
CSS6006
JSON4004

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity22.18
▷ Minimum class complexity1.00
▷ Maximum class complexity75.00
Average method complexity2.95
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits31
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods479
▷ Static methods132.71%
▷ Public methods28759.92%
▷ Protected methods9419.62%
▷ Private methods9820.46%
Functions52
▷ Named functions1834.62%
▷ Anonymous functions3465.38%
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
There were not PNG files found in your plugin