89% yith-woocommerce-quick-view

Code Review | YITH WooCommerce Quick View

WordPress plugin YITH WooCommerce Quick View scored89%from 54 tests.

About plugin

  • Plugin page: yith-woocommerce-...
  • Plugin version: 1.33.0
  • PHP version: 7.4.16
  • WordPress compatibility: 8.1-6.4
  • WordPress version: 6.3.1
  • First release: Feb 17, 2015
  • Latest release: Nov 13, 2023
  • Number of updates: 156
  • Update frequency: every 20.5 days
  • Top authors: yithemes (100%)

Code review

54 tests

User reviews

24 reviews

Install metrics

100,000+ active /4,714,295 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
This plugin's installer ran successfully

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

Analyzing server-side resources used by YITH WooCommerce Quick View
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0237.41 ▼5.86
Dashboard /wp-admin3.33 ▼0.0245.72 ▼14.54
Posts /wp-admin/edit.php3.39 ▲0.0248.07 ▲0.17
Add New Post /wp-admin/post-new.php5.92 ▲0.0281.07 ▼22.09
Media Library /wp-admin/upload.php3.26 ▲0.0239.39 ▲5.91

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for YITH WooCommerce Quick View
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲4914.32 ▼0.021.75 ▼0.0240.10 ▼2.35
Dashboard /wp-admin2,201 ▲245.59 ▲0.0486.07 ▼13.2242.44 ▼1.61
Posts /wp-admin/edit.php2,107 ▲71.97 ▼0.0338.28 ▲2.2838.44 ▲1.17
Add New Post /wp-admin/post-new.php1,532 ▲623.10 ▲0.20663.66 ▲22.5552.02 ▼7.31
Media Library /wp-admin/upload.php1,400 ▼04.20 ▲0.04100.75 ▼3.0442.33 ▼3.26

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • yit_recently_activated
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 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 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === yith-woocommerce-quick-view === )
You can look at the official readme.txt

yith-woocommerce-quick-view/init.php 77% from 13 tests

"YITH WooCommerce Quick View" version 1.33.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 247 characters long)
  • Requires at least: Required version must be the same as the one declared in readme.txt ("6.2" instead of "8.1")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("yith-woocommerce-quick-view.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin45,635 lines of code in 303 files:
LanguageFilesBlank linesComment linesLines of code
PHP1712,7115,49915,224
JavaScript631,4891,03810,226
CSS191,6692469,313
PO File71,6982,1714,509
Sass34652153,432
SVG8012,926
XML1005

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity42.97
▷ Minimum class complexity1.00
▷ Maximum class complexity336.00
Average method complexity4.03
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes29
▷ Abstract classes13.45%
▷ Concrete classes2896.55%
▷ Final classes00.00%
Methods389
▷ Static methods5213.37%
▷ Public methods31781.49%
▷ Protected methods5213.37%
▷ Private methods205.14%
Functions141
▷ Named functions13394.33%
▷ Anonymous functions85.67%
Constants18
▷ Global constants1794.44%
▷ Class constants15.56%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
58 PNG files occupy 0.73MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
plugin-fw/assets/images/x.png0.70KB0.71KB0.00%
plugin-fw/assets/css/jquery-ui/images/ui-icons_222222_256x240.png3.69KB4.18KB0.00%
plugin-fw/assets/css/jquery-ui/images/ui-bg_flat_0_aaaaaa_40x100.png0.08KB0.08KB0.00%
assets/image/07-bg.png2.47KB1.13KB▼ 54.07%
assets/image/08-icon.png1.75KB0.61KB▼ 65.37%