83% woo-product-hover-popup-image

Code Review | Woocommerce Product Hover Popup Image

WordPress plugin Woocommerce Product Hover Popup Image scored83%from 54 tests.

About plugin

  • Plugin page: woo-product-hover...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: May 15, 2017
  • Latest release: May 15, 2017
  • Number of updates: 3
  • Update frequency: every 1.7 days
  • Top authors: dangngocbinh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /822 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼9.98ms] Passed 4 tests

Analyzing server-side resources used by Woocommerce Product Hover Popup Image
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0644.62 ▲0.18
Dashboard /wp-admin3.40 ▲0.0150.44 ▼18.38
Posts /wp-admin/edit.php3.51 ▲0.1151.73 ▲4.95
Add New Post /wp-admin/post-new.php6.00 ▲0.0787.78 ▼23.87
Media Library /wp-admin/upload.php3.32 ▲0.0537.50 ▲2.14

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Woocommerce Product Hover Popup Image
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,907 ▲16113.50 ▼0.859.02 ▲7.4142.73 ▼1.80
Dashboard /wp-admin2,205 ▲255.61 ▼0.0084.56 ▼5.1442.19 ▲1.76
Posts /wp-admin/edit.php2,111 ▲81.98 ▼0.0134.36 ▼3.4036.03 ▲1.17
Add New Post /wp-admin/post-new.php1,536 ▲822.96 ▼0.02678.88 ▼64.8160.07 ▲4.48
Media Library /wp-admin/upload.php1,407 ▲44.18 ▼0.03100.20 ▼0.0043.88 ▼0.92

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Almost there! Just fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/woo-product-hover-popup-image/admin/partials/hover-popup-admin-display.php
    • > /wp-content/plugins/woo-product-hover-popup-image/public/partials/hover-popup-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% 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 your attention:
  • Screenshots: Add descriptions for screenshots #1, #2 in woo-product-hover-popup-image/assets to your readme.txt
  • Donate link: Please fix this invalid URI: "dangngocbinh.com"
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === woo-product-hover-popup-image === )
You can look at the official readme.txt

woo-product-hover-popup-image/hover-popup.php 85% from 13 tests

The principal PHP file in "Woocommerce Product Hover Popup Image" v. 1.0.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woo-product-hover-popup-image.php" instead of "hover-popup.php")
  • 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

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin225 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12122530184
JavaScript2112733
CSS2088

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity1.57
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.15
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods26
▷ Static methods27.69%
▷ Public methods2180.77%
▷ Protected methods00.00%
▷ Private methods519.23%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin