78% z-companion

Code Review | Z Companion

WordPress plugin Z Companion scored78%from 54 tests.

About plugin

  • Plugin page: z-companion
  • Plugin version: 1.0.13
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.9
  • WordPress version: 6.3.1
  • First release: Jan 27, 2021
  • Latest release: Jan 28, 2022
  • Number of updates: 14
  • Update frequency: every 26.7 days
  • Top authors: wpzita (100%)

Code review

54 tests

User reviews

1 review

Install metrics

600+ active /12,422 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.49MB] [CPU: ▼0.10ms] Passed 4 tests

A check of server-side resources used by Z Companion
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.98 ▲0.5340.11 ▲0.18
Dashboard /wp-admin3.82 ▲0.5246.23 ▼2.00
Posts /wp-admin/edit.php3.87 ▲0.5250.47 ▲0.03
Add New Post /wp-admin/post-new.php6.36 ▲0.4792.91 ▲1.39
Media Library /wp-admin/upload.php3.68 ▲0.4642.02 ▲7.75
Z Companion Sites /wp-admin/themes.php?page=z-companion-sites3.6738.65

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 95 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Z Companion
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,880 ▲14513.28 ▼1.241.73 ▲0.1240.43 ▼0.85
Dashboard /wp-admin2,289 ▲1045.85 ▲0.97106.39 ▼3.2382.99 ▲39.63
Posts /wp-admin/edit.php2,175 ▲1072.16 ▲0.1639.78 ▲2.7140.58 ▲8.21
Add New Post /wp-admin/post-new.php1,659 ▲14522.34 ▲4.87684.71 ▼10.7848.91 ▼2.72
Media Library /wp-admin/upload.php1,459 ▲714.26 ▲0.05109.28 ▲6.9898.97 ▲56.43
Z Companion Sites /wp-admin/themes.php?page=z-companion-sites1,1281.9944.6541.66

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
The following issues need your attention
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/z-companion/notify/notify-html.php
    • > /wp-content/plugins/z-companion/royal-shop/customizer/repeater/icon-picker/icons.php
    • > /wp-content/plugins/z-companion/import/inc/key-api/form.php
  • 12× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: display in wp-content/plugins/z-companion/notify/notify-html.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/z-companion/royal-shop/widget/post-single-slide-widget.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/z-companion/import/inc/key-api/form.php:77
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/z-companion/royal-shop/widget/highlight-widget.php:8
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_setting() on null in wp-content/plugins/z-companion/royal-shop/customizer/frontpage/higlight.php:2
    • > PHP Warning
      Use of undefined constant Z_COMPANION_PLUGIN_DIR_URL - assumed 'Z_COMPANION_PLUGIN_DIR_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/z-companion/notify/notify-html.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/z-companion/royal-shop/widget/product-widget-multi-slide.php:9
    • > PHP Notice
      Undefined variable: theme in wp-content/plugins/z-companion/notify/notify-html.php on line 4
    • > PHP Notice
      Undefined variable: wp_customize in wp-content/plugins/z-companion/royal-shop/customizer/frontpage/higlight.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/z-companion/admin/enqueue.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Choose your desired demo.), #2 (Install and Activate required plugin.), #3 (Import website.), #4 (View website.)
You can look at the official readme.txt

z-companion/z-companion.php Passed 13 tests

The main PHP file in "Z Companion" ver. 1.0.13 adds more information about the plugin and also serves as the entry point for this plugin
98 characters long description:
Z-Companion plugin is specially made for wpzita themes.This plugin boost up features in the theme.

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 plugin18,795 lines of code in 79 files:
LanguageFilesBlank linesComment linesLines of code
PHP551,4111,8918,521
JavaScript131,0031,3804,263
CSS9104513,311
SVG2102,700

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity29.33
▷ Minimum class complexity1.00
▷ Maximum class complexity262.00
Average method complexity4.51
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes27
▷ Abstract classes00.00%
▷ Concrete classes27100.00%
▷ Final classes00.00%
Methods218
▷ Static methods2310.55%
▷ Public methods16374.77%
▷ Protected methods3415.60%
▷ Private methods219.63%
Functions47
▷ Named functions47100.00%
▷ Anonymous functions00.00%
Constants32
▷ Global constants1650.00%
▷ Class constants1650.00%
▷ Public constants16100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 0.09MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
notify/assets/images/th-shop-mania.png34.78KB11.98KB▼ 65.56%
import/assets/image/wpzita.png26.43KB7.66KB▼ 71.00%
import/assets/image/zita-icon.png3.44KB0.75KB▼ 78.26%
import/assets/image/siteorigin.png7.39KB4.10KB▼ 44.50%
import/assets/image/elementor.png15.73KB2.95KB▼ 81.27%