83% engage-by-zubi

Code Review | Engage for WooCommerce

WordPress plugin Engage for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: engage-by-zubi
  • Plugin version: 2023.9.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.10-6.1
  • WordPress version: 6.3.1
  • First release: Sep 4, 2019
  • Latest release: Sep 25, 2023
  • Number of updates: 59
  • Update frequency: every 25.1 days
  • Top authors: zubiai (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /2,304 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Engage for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.59 ▼2.14
Dashboard /wp-admin3.31 ▲0.0047.43 ▼2.35
Posts /wp-admin/edit.php3.36 ▲0.0046.36 ▼3.55
Add New Post /wp-admin/post-new.php5.89 ▲0.0096.60 ▼2.67
Media Library /wp-admin/upload.php3.23 ▲0.0031.85 ▼2.33

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Engage for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4314.48 ▲0.191.82 ▼0.5043.81 ▲0.69
Dashboard /wp-admin2,200 ▲155.84 ▼0.02105.01 ▼0.1738.76 ▼1.32
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0740.59 ▼0.6835.44 ▼3.90
Add New Post /wp-admin/post-new.php1,534 ▼022.99 ▼0.17666.72 ▲13.0758.60 ▼17.13
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.08107.26 ▲8.1047.13 ▲0.33

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/engage-by-zubi/views/settings.php:4
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/engage-by-zubi/views/dashboard-notices.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/engage-by-zubi/views/sidebar.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 26 tag instead of maximum 10
You can take inspiration from this readme.txt

engage-by-zubi/ebz.php 85% from 13 tests

The main PHP file in "Engage for WooCommerce" ver. 2023.9.2 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 179 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("engage-by-zubi.php" instead of "ebz.php")

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
There were no executable files found in this plugin4,779 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP56274834,131
CSS47416450
Markdown1760134
SVG140064

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity203.00
▷ Minimum class complexity48.00
▷ Maximum class complexity358.00
Average method complexity7.93
▷ Minimum method complexity1.00
▷ Maximum method complexity61.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods59
▷ Static methods00.00%
▷ Public methods5593.22%
▷ Protected methods46.78%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
12 PNG files occupy 2.29MB with 1.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png253.68KB142.77KB▼ 43.72%
views/engage_logo.png42.90KB20.21KB▼ 52.89%
screenshot-2.png299.69KB157.07KB▼ 47.59%
screenshot-5.png504.79KB295.79KB▼ 41.40%
banner-1544x500.png450.06KB166.38KB▼ 63.03%