89% product-cloudzoom-ultimate-for-woocommerce-product-images

Code Review | Ultimate WooCommerce CloudZoom for Product Images

WordPress plugin Ultimate WooCommerce CloudZoom for Product Images scored89%from 54 tests.

About plugin

  • Plugin page: product-cloudzoom...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.1.1
  • WordPress version: 6.3.1
  • First release: Jul 22, 2015
  • Latest release: Apr 24, 2019
  • Number of updates: 10
  • Update frequency: every 137.2 days
  • Top authors: magniumthemes (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

30+ active /8,429 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
This plugin's installer ran successfully

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

An overview of server-side resources used by Ultimate WooCommerce CloudZoom for Product Images
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.42 ▼0.0425.20 ▼16.26
Dashboard /wp-admin3.35 ▲0.0451.37 ▲4.31
Posts /wp-admin/edit.php3.40 ▲0.0451.44 ▲2.84
Add New Post /wp-admin/post-new.php5.93 ▲0.04108.94 ▲9.57
Media Library /wp-admin/upload.php3.27 ▲0.0436.78 ▲3.16

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Ultimate WooCommerce CloudZoom for Product Images
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,527 ▼24413.28 ▼1.470.56 ▼1.4215.68 ▼22.87
Dashboard /wp-admin2,271 ▲864.89 ▼1.0199.87 ▼7.4583.66 ▲39.70
Posts /wp-admin/edit.php2,154 ▲622.03 ▲0.0040.38 ▲1.4933.99 ▼1.13
Add New Post /wp-admin/post-new.php1,730 ▲21124.71 ▲1.50704.76 ▲95.0361.81 ▲15.86
Media Library /wp-admin/upload.php1,453 ▲654.21 ▼0.03102.27 ▲0.1648.93 ▲6.90

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
  • Plugin Name: You should set the name of your plugin on the first line ( === product-cloudzoom-ultimate-for-woocommerce-product-images === )
You can look at the official readme.txt

product-cloudzoom-ultimate-for-woocommerce-product-images/mgwoocommercecloudzoom.php 92% from 13 tests

"Ultimate WooCommerce CloudZoom for Product Images" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("product-cloudzoom-ultimate-for-woocommerce-product-images.php" instead of "mgwoocommercecloudzoom.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected646 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript25351361
PHP15337140
PO File14242110
CSS14535

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity1.69
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.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
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/hosting-wp-button.png26.03KB9.36KB▼ 64.05%