84% product-image-zoom-for-woocommerce

Code Review | Easy Product Image Zoom For WooCommerce

WordPress plugin Easy Product Image Zoom For WooCommerce scored 84% from 54 tests.

About plugin

  • Plugin page: product-image-zoo...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4
  • WordPress version: 6.3.1
  • First release: Jan 1, 2020
  • Latest release: Apr 29, 2020
  • Number of updates: 6
  • Update frequency: every 23.2 days
  • Top authors: azplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 3,879 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
Install script ran successfully

Server metrics [RAM: ▲0.21MB] [CPU: ▼3.03ms] Passed 4 tests

An overview of server-side resources used by Easy Product Image Zoom For WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1442.61 ▼2.47
Dashboard /wp-admin3.60 ▲0.3051.34 ▲3.56
Posts /wp-admin/edit.php3.65 ▲0.3053.33 ▲3.06
Add New Post /wp-admin/post-new.php6.09 ▲0.2189.88 ▼14.07
Media Library /wp-admin/upload.php3.44 ▲0.2136.38 ▲1.37
Product Image Zoom /wp-admin/admin.php?page=pizfwc_options3.4341.14

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 9 new options
New WordPress options
db_upgraded
widget_recent-posts
pizfwc_settings_styling
can_compress_scripts
pizfwc_settings_general
pizfwc_settings_animation
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy Product Image Zoom For WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,957 ▲22215.12 ▲0.381.75 ▼0.3046.04 ▼3.74
Dashboard /wp-admin2,366 ▲1786.65 ▲1.73139.88 ▲21.7542.07 ▼0.73
Posts /wp-admin/edit.php2,272 ▲1803.63 ▲1.6457.13 ▲15.5235.76 ▼1.09
Add New Post /wp-admin/post-new.php1,538 ▲2118.30 ▲0.64630.75 ▼11.8640.27 ▼14.98
Media Library /wp-admin/upload.php1,402 ▲144.30 ▲0.1181.38 ▼30.3643.61 ▲0.38
Product Image Zoom /wp-admin/admin.php?page=pizfwc_options1,6033.6072.5624.43

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 does not fully uninstall, leaving 9 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • pizfwc_settings_styling
    • can_compress_scripts
    • pizfwc_settings_general
    • widget_recent-comments
    • pizfwc_settings_animation
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/product-image-zoom-for-woocommerce/init.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function remove_theme_support() in wp-content/plugins/product-image-zoom-for-woocommerce/includes/woo-config.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PIZFWC_Settings_API' not found in wp-content/plugins/product-image-zoom-for-woocommerce/includes/plugin-options.php:12

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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: product image zoom, hover zoom, zoom, woocommerce, magnifier

product-image-zoom-for-woocommerce/init.php 85% from 13 tests

Analyzing the main PHP file in "Easy Product Image Zoom For WooCommerce" version 1.0.2
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("product-image-zoom-for-woocommerce.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin2,212 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript23941761,360
PHP5176266832
CSS11120

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity36.00
▷ Minimum class complexity3.00
▷ Maximum class complexity69.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods36
▷ Static methods00.00%
▷ Public methods36100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions1090.91%
▷ Anonymous functions19.09%
Constants3
▷ Global constants3100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/window-positions.png4.44KB2.52KB▼ 43.12%