78% product-image-hover-addon-for-woocommerce

Code Review | Product Image Hover Addon For WooCommerce

WordPress plugin Product Image Hover Addon For WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: product-image-hov...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.2
  • WordPress version: 6.3.1
  • First release: May 27, 2023
  • Latest release: May 27, 2023
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: narinderbisht (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /88 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

Server-side resources used by Product Image Hover Addon For WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0139.22 ▼3.29
Dashboard /wp-admin3.32 ▲0.0147.59 ▼10.89
Posts /wp-admin/edit.php3.37 ▲0.0147.02 ▼7.87
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.01 ▼11.14
Media Library /wp-admin/upload.php3.24 ▲0.0136.00 ▲0.65

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

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

Browser metrics Passed 4 tests

Product Image Hover Addon For WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲6514.35 ▼0.202.13 ▲0.4739.68 ▼3.95
Dashboard /wp-admin2,207 ▲295.62 ▼0.1194.75 ▼14.8440.41 ▼7.04
Posts /wp-admin/edit.php2,115 ▲122.03 ▲0.0339.03 ▼0.2437.48 ▼0.97
Add New Post /wp-admin/post-new.php1,538 ▲1223.44 ▼0.02720.50 ▲10.3961.77 ▲1.40
Media Library /wp-admin/upload.php1,409 ▲124.23 ▲0.0799.30 ▼21.5545.94 ▼2.07

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means 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
Please fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/product-image-hover-addon-for-woocommerce/woo-product-image-hover.php
    • > /wp-content/plugins/product-image-hover-addon-for-woocommerce/index.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function remove_action() in wp-content/plugins/product-image-hover-addon-for-woocommerce/includes/woo-frontend-image-action.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-image-hover-addon-for-woocommerce/includes/woo-adminend-image-action.php:21

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes: You can take inspiration from this readme.txt

product-image-hover-addon-for-woocommerce/woo-product-image-hover.php 85% from 13 tests

The main PHP file in "Product Image Hover Addon For WooCommerce" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("product-image-hover-addon-for-woocommerce.php" instead of "woo-product-image-hover.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected243 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP45742148
JavaScript118541
PO File19939
CSS12215

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity9.50
▷ Minimum class complexity5.00
▷ Maximum class complexity14.00
Average method complexity2.42
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods18.33%
▷ Public methods1191.67%
▷ Protected methods18.33%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin