78% product-display-for-zen-cart

Code Review | Product Display for Zen Cart

WordPress plugin Product Display for Zen Cart scored78%from 54 tests.

About plugin

  • Plugin page: product-display-f...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.8
  • WordPress version: 6.3.1
  • First release: Jul 12, 2017
  • Latest release: Apr 9, 2018
  • Number of updates: 3
  • Update frequency: every 90.3 days
  • Top authors: scottcwilson (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /630 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.82ms] Passed 4 tests

A check of server-side resources used by Product Display for Zen Cart
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0243.03 ▲1.08
Dashboard /wp-admin3.33 ▲0.0252.33 ▼7.05
Posts /wp-admin/edit.php3.38 ▲0.0247.92 ▼0.47
Add New Post /wp-admin/post-new.php5.91 ▲0.0294.56 ▼12.62
Media Library /wp-admin/upload.php3.25 ▲0.0238.10 ▲0.88
Product Display for Zen Cart /wp-admin/options-general.php?page=zen_cart_product_display_3.1935.16

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Product Display for Zen Cart
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲3913.27 ▼1.394.82 ▲2.7843.54 ▲0.30
Dashboard /wp-admin2,212 ▲275.79 ▼0.06105.20 ▼1.7939.88 ▼1.04
Posts /wp-admin/edit.php2,095 ▲62.03 ▼0.0235.78 ▼7.9033.37 ▼6.98
Add New Post /wp-admin/post-new.php1,519 ▼017.67 ▼5.34643.39 ▼0.6950.66 ▼29.88
Media Library /wp-admin/upload.php1,388 ▼34.20 ▼0.00103.55 ▲4.0745.18 ▲3.93
Product Display for Zen Cart /wp-admin/options-general.php?page=zen_cart_product_display_7972.1522.6028.38

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=zen_cart_product_display_
    • > Notice in wp-content/plugins/product-display-for-zen-cart/product_display_for_zencart.php+110
    Trying to access array offset on value of type bool

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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-display-for-zen-cart/product_display_for_zencart.php:68

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
1 plugin tags: zencart

product-display-for-zen-cart/product_display_for_zencart.php 77% from 13 tests

The primary PHP file in "Product Display for Zen Cart" version 1.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder was not found ("/languages")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("product-display-for-zen-cart.php" instead of "product_display_for_zencart.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin95 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1402185
CSS10510

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin