66% xt-woo-quick-view-lite

Code Review | XT Quick View for WooCommerce

WordPress plugin XT Quick View for WooCommerce scored66%from 54 tests.

About plugin

  • Plugin page: xt-woo-quick-view...
  • Plugin version: 2.1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.3
  • WordPress version: 6.3.1
  • First release: Apr 25, 2017
  • Latest release: Aug 25, 2023
  • Number of updates: 226
  • Update frequency: every 10.2 days
  • Top authors: xplodedthemes (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

800+ active /39,137 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲6.28MB] [CPU: ▲33.31ms] 50% from 4 tests

A check of server-side resources used by XT Quick View for WooCommerce
Please take the time to fix the following items
  • RAM: You should keep total memory usage under 10MB (currently 10.31MB on /wp-admin/admin.php?page=freemius)
  • Extra RAM: Try to keep extra memory usage under 5MB (currently 6.28MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.86 ▲6.4076.38 ▲35.19
Dashboard /wp-admin10.23 ▲6.9386.95 ▲39.87
Posts /wp-admin/edit.php10.32 ▲6.9677.54 ▲33.41
Add New Post /wp-admin/post-new.php10.70 ▲4.81118.02 ▲24.77
Media Library /wp-admin/upload.php10.32 ▲7.0984.52 ▲51.05
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius10.3176.29

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 919 new files
Database: no new tables, 10 new options
New WordPress options
xtfw_active_plugins
widget_recent-posts
fs_active_plugins
fs_accounts
fs_debug_mode
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for XT Quick View for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲9913.32 ▼1.031.56 ▼0.8430.07 ▼15.34
Dashboard /wp-admin2,238 ▲504.84 ▼0.99106.17 ▼1.7241.34 ▼1.66
Posts /wp-admin/edit.php2,121 ▲322.06 ▲0.0639.97 ▲3.0338.43 ▲1.22
Add New Post /wp-admin/post-new.php1,538 ▲1022.20 ▲3.91653.04 ▲0.5057.05 ▼9.48
Media Library /wp-admin/upload.php1,414 ▲294.20 ▼0.0595.94 ▼6.7843.04 ▲1.27
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0851.7126.9730.19

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/xt-woo-quick-view-lite/xt-framework/includes/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 10 options in the database
    • widget_recent-comments
    • xtfw_active_plugins
    • widget_recent-posts
    • can_compress_scripts
    • fs_debug_mode
    • fs_accounts
    • fs_active_plugins
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 8× PHP files output text when accessed directly:
    • > /wp-content/plugins/xt-woo-quick-view-lite/xt-framework/includes/customizer/xirki/controls/views/textarea.php
    • > /wp-content/plugins/xt-woo-quick-view-lite/xt-framework/includes/customizer/xirki/controls/views/color.php
    • > /wp-content/plugins/xt-woo-quick-view-lite/xt-framework/includes/customizer/xirki/controls/views/generic.php
    • > /wp-content/plugins/xt-woo-quick-view-lite/xt-framework/includes/customizer/xirki/controls/views/code.php
    • > /wp-content/plugins/xt-woo-quick-view-lite/xt-framework/includes/customizer/xirki/controls/views/select.php
    • > /wp-content/plugins/xt-woo-quick-view-lite/xt-framework/includes/customizer/xirki/controls/views/number.php
    • > /wp-content/plugins/xt-woo-quick-view-lite/xt-framework/includes/customizer/xirki/modules/webfonts/class-xirki-fonts-helper.php
    • > /wp-content/plugins/xt-woo-quick-view-lite/xt-framework/includes/customizer/xirki/controls/views/radio.php
  • 82× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/xt-woo-quick-view-lite/admin/customizer/fields/modal-product-slider.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Xirki_Control_Base' not found in wp-content/plugins/xt-woo-quick-view-lite/xt-framework/includes/customizer/xirki/controls/php/class-xirki-control-image.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/xt-woo-quick-view-lite/xt-framework/includes/customizer/xirki/controls/views/image.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'Xirki_Field' not found in wp-content/plugins/xt-woo-quick-view-lite/xt-framework/includes/customizer/xirki/field/class-xirki-field-xirki-generic.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Xirki_Field' not found in wp-content/plugins/xt-woo-quick-view-lite/xt-framework/includes/customizer/xirki/field/class-xirki-field-dimensions.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/xt-woo-quick-view-lite/admin/migrations/migration-1.2.0.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Xirki_Field_Dimensions' not found in wp-content/plugins/xt-woo-quick-view-lite/xt-framework/includes/customizer/xirki/field/class-xirki-field-spacing.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Xirki_Field' not found in wp-content/plugins/xt-woo-quick-view-lite/xt-framework/includes/customizer/xirki/field/class-xirki-field-multicolor.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Xirki_Field_Number' not found in wp-content/plugins/xt-woo-quick-view-lite/xt-framework/includes/customizer/xirki/field/class-xirki-field-slider.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/xt-woo-quick-view-lite/admin/customizer/fields/modal-close-button.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 88% 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:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
  • Screenshots: These screenshots lack descriptions #1, #2, #3 in xt-woo-quick-view-lite/assets to your readme.txt
Please take inspiration from this readme.txt

xt-woo-quick-view-lite/xt-woo-quick-view.php 69% from 13 tests

"XT Quick View for WooCommerce" version 2.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("xt-woo-quick-view-lite.php" instead of "xt-woo-quick-view.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 218 characters long)
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.6" instead of "3.0.0")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin109,025 lines of code in 758 files:
LanguageFilesBlank linesComment linesLines of code
PHP35312,89428,49951,974
JavaScript1608,7216,24432,601
Sass1782,04087810,294
JSON5008,319
SVG14092,834
CSS41112261,728
Markdown235201,107
XML42453141
YAML17027

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
These items need your attention
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity31.74
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity3.93
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes223
▷ Abstract classes52.24%
▷ Concrete classes21897.76%
▷ Final classes104.59%
Methods2,344
▷ Static methods33414.25%
▷ Public methods1,67271.33%
▷ Protected methods26911.48%
▷ Private methods40317.19%
Functions260
▷ Named functions17567.31%
▷ Anonymous functions8532.69%
Constants175
▷ Global constants12571.43%
▷ Class constants5028.57%
▷ Public constants50100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
56 PNG files occupy 1.01MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
xt-framework/assets/css/jquery-ui/images/ui-icons_cd0a0a_256x240.png3.69KB4.18KB0.00%
xt-framework/assets/css/jquery-ui/images/ui-bg_glass_55_fbf9ee_1x400.png0.11KB0.14KB0.00%
xt-framework/includes/admin-tabs/assets/images/xploded.png14.85KB5.17KB▼ 65.15%
xt-framework/includes/customizer/xirki/assets/images/xirki-bottom.png1.51KB1.09KB▼ 27.94%
xt-framework/includes/settings/assets/images/calendar.png0.22KB0.23KB0.00%