83% zend-for-woocommerce

Code Review | Zend for WooCommerce

WordPress plugin Zend for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: zend-for-woocommerce
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.8
  • WordPress version: 6.3.1
  • First release: Jul 28, 2021
  • Latest release: Oct 16, 2021
  • Number of updates: 3
  • Update frequency: every 26.7 days
  • Top authors: avanciro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /319 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.11ms] Passed 4 tests

A check of server-side resources used by Zend for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.80 ▼1.57
Dashboard /wp-admin3.32 ▲0.0154.55 ▲1.45
Posts /wp-admin/edit.php3.37 ▲0.0149.30 ▼2.77
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.71 ▼14.13
Media Library /wp-admin/upload.php3.24 ▲0.0136.80 ▼1.96

Server storage [IO: ▲0.35MB] [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: 14 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Zend for WooCommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5414.53 ▼0.221.81 ▲0.0842.73 ▲0.18
Dashboard /wp-admin2,224 ▲245.88 ▲0.02101.12 ▼16.7739.36 ▼9.62
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0037.12 ▼0.1634.28 ▼1.84
Add New Post /wp-admin/post-new.php1,545 ▼921.16 ▲3.11697.06 ▲78.4144.88 ▼23.22
Media Library /wp-admin/upload.php1,403 ▼04.25 ▼0.1598.42 ▼2.7743.24 ▼3.26

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/zend-for-woocommerce/core/zend.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: These screenshots do not have images: #1 (Admin settings page), #2 (Admin settings page)
The official readme.txt is a good inspiration

zend-for-woocommerce/zendlk-woocommerce.php 85% from 13 tests

The primary PHP file in "Zend for WooCommerce" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("zend-for-woocommerce.php" instead of "zendlk-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected1,088 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP19254540981
JSON30089
Markdown210018

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity14.20
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity3.20
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods61
▷ Static methods2337.70%
▷ Public methods5691.80%
▷ Protected methods00.00%
▷ Private methods58.20%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
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
2 PNG files occupy 0.30MB with 0.20MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png144.09KB47.05KB▼ 67.35%
assets/screenshot-1.png159.76KB53.22KB▼ 66.69%