90% woocommerce-image-hover

Code Review | WooCommerce Image Hover

WordPress plugin WooCommerce Image Hover scored90%from 54 tests.

About plugin

  • Plugin page: woocommerce-image...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.9.6
  • WordPress version: 6.3.1
  • First release: Jun 5, 2015
  • Latest release: Dec 18, 2019
  • Number of updates: 18
  • Update frequency: every 92.1 days
  • Top authors: Brad Davis (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

500+ active /25,924 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
Installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼5.44ms] Passed 4 tests

Server-side resources used by WooCommerce Image Hover
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.85 ▼5.19
Dashboard /wp-admin3.31 ▼0.0351.62 ▼11.31
Posts /wp-admin/edit.php3.36 ▲0.0144.49 ▼2.16
Add New Post /wp-admin/post-new.php5.89 ▲0.0183.47 ▼3.11
Media Library /wp-admin/upload.php3.23 ▲0.0032.46 ▼2.00

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Image Hover
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.17 ▼0.181.62 ▼0.0238.53 ▲0.66
Dashboard /wp-admin2,198 ▲175.64 ▼0.0883.10 ▼15.5437.35 ▲0.49
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0136.65 ▼3.0531.67 ▼2.06
Add New Post /wp-admin/post-new.php1,540 ▲1418.11 ▼5.43634.02 ▼3.0961.80 ▼15.03
Media Library /wp-admin/upload.php1,400 ▼04.16 ▼0.0297.43 ▼4.2840.66 ▼0.95

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

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

Smoke tests Passed 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 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% 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
3 plugin tags: woocommerce, woocommerce-image, woocommerce-product-images

woocommerce-image-hover/woocommerce-image-hover.php 92% from 13 tests

The entry point to "WooCommerce Image Hover" version 2.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("4.0" instead of "3.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin34 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1135222
JavaScript10412

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.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
No PNG files were detected