83% yith-woocommerce-popup

Code Review | YITH WooCommerce Popup

WordPress plugin YITH WooCommerce Popup scored83%from 54 tests.

About plugin

  • Plugin page: yith-woocommerce-...
  • Plugin version: 1.34.0
  • PHP version: 7.4.16
  • WordPress compatibility: 8.2-6.4
  • WordPress version: 6.3.1
  • First release: Jul 31, 2015
  • Latest release: Dec 1, 2023
  • Number of updates: 126
  • Update frequency: every 24.2 days
  • Top authors: yithemes (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

4,000+ active /241,349 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.02MB] [CPU: ▼8.50ms] Passed 4 tests

A check of server-side resources used by YITH WooCommerce Popup
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.38 ▼8.93
Dashboard /wp-admin3.33 ▼0.0147.33 ▼22.70
Posts /wp-admin/edit.php3.38 ▲0.0350.06 ▲1.87
Add New Post /wp-admin/post-new.php5.91 ▲0.0394.04 ▲1.58
Media Library /wp-admin/upload.php3.26 ▲0.0332.27 ▼3.93

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 360 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
yit_recently_activated
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by YITH WooCommerce Popup
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲4914.67 ▲0.331.57 ▼0.2036.60 ▼5.29
Dashboard /wp-admin2,201 ▲245.56 ▼0.0789.93 ▼8.2741.78 ▲3.34
Posts /wp-admin/edit.php2,110 ▲101.96 ▼0.0241.08 ▼1.3637.79 ▼0.08
Add New Post /wp-admin/post-new.php1,532 ▲623.17 ▼0.16635.17 ▲49.0248.83 ▼11.79
Media Library /wp-admin/upload.php1,406 ▲124.23 ▲0.0496.14 ▼0.9042.85 ▲3.12

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • yit_recently_activated
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/yith-woocommerce-popup/templates/admin/premium.php:149
    • > PHP Warning
      extract() expects parameter 1 to be array, null given in wp-content/plugins/yith-woocommerce-popup/templates/metaboxes/types/iconlist.php on line 17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: popup, custom popup, woocommerce popup, popups, pop-up

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

The main PHP file in "YITH WooCommerce Popup" ver. 1.34.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("yith-woocommerce-popup.php" instead of "init.php")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("6.2" instead of "8.2")
  • Description: Please keep the plugin description shorter than 140 characters (currently 505 characters long)

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 plugin44,416 lines of code in 289 files:
LanguageFilesBlank linesComment linesLines of code
PHP1953,3218,12017,928
CSS211,7452949,646
JavaScript571,3718619,562
PO File61,5661,9204,307
SVG8012,926
XML212947

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity10.95
▷ Minimum class complexity1.00
▷ Maximum class complexity336.00
Average method complexity3.39
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes133
▷ Abstract classes10.75%
▷ Concrete classes13299.25%
▷ Final classes00.00%
Methods537
▷ Static methods5410.06%
▷ Public methods46386.22%
▷ Protected methods529.68%
▷ Private methods224.10%
Functions149
▷ Named functions14194.63%
▷ Anonymous functions85.37%
Constants20
▷ Global constants1995.00%
▷ Class constants15.00%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
50 PNG files occupy 0.58MB with 0.24MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
plugin-fw/assets/images/sidebar-right.png0.95KB0.11KB▼ 87.91%
plugin-fw/assets/css/jquery-ui/images/ui-icons_222222_256x240.png3.69KB4.18KB0.00%
plugin-fw/assets/css/jquery-ui/images/ui-icons_454545_256x240.png3.69KB4.18KB0.00%
assets/images/01.png107.46KB38.12KB▼ 64.53%
assets/images/close-buttons/close1.png1.44KB0.68KB▼ 53.02%