66% woo-floating-cart-lite

Code Review | XT Floating Cart for WooCommerce

WordPress plugin XT Floating Cart for WooCommerce scored 66% from 54 tests.

About plugin

  • Plugin page: woo-floating-cart...
  • Plugin version: 2.7.5
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.3
  • WordPress version: 6.3.1
  • First release: Dec 1, 2016
  • Latest release: Aug 25, 2023
  • Number of updates: 463
  • Update frequency: every 5.3 days
  • Top authors: xplodedthemes (100%)

Code review

54 tests

User reviews

132 reviews

Install metrics

7,000+ active / 377,779 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.68MB] [CPU: ▼0.44ms] Passed 4 tests

An overview of server-side resources used by XT Floating Cart for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.18 ▲0.7243.15 ▼1.22
Dashboard /wp-admin4.05 ▲0.7459.72 ▲13.58
Posts /wp-admin/edit.php4.09 ▲0.7449.82 ▼0.88
Add New Post /wp-admin/post-new.php6.58 ▲0.7093.30 ▼3.48
Media Library /wp-admin/upload.php3.80 ▲0.5738.37 ▲3.81
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius4.1337.94

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 844 new files
Database: no new tables, 10 new options
New WordPress options
fs_active_plugins
can_compress_scripts
fs_accounts
xtfw_active_plugins
fs_debug_mode
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for XT Floating Cart for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲9914.45 ▲0.081.72 ▼0.1832.85 ▼5.47
Dashboard /wp-admin2,235 ▲535.79 ▲0.8497.85 ▼6.0541.65 ▲2.80
Posts /wp-admin/edit.php2,121 ▲322.05 ▲0.0135.70 ▼4.3636.51 ▲0.42
Add New Post /wp-admin/post-new.php1,535 ▲523.22 ▲5.01683.66 ▲42.3973.98 ▲21.76
Media Library /wp-admin/upload.php1,417 ▲294.21 ▲0.0197.20 ▲0.8847.87 ▼2.86
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0851.8427.7027.90

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/woo-floating-cart-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-posts
    • fs_accounts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • fs_active_plugins
    • theysaidso_admin_options
    • db_upgraded
    • fs_debug_mode
    • xtfw_active_plugins

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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
The following issues need your attention
  • 8× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/woo-floating-cart-lite/xt-framework/includes/customizer/xirki/controls/views/textarea.php
    • > /wp-content/plugins/woo-floating-cart-lite/xt-framework/includes/customizer/xirki/modules/webfonts/class-xirki-fonts-helper.php
    • > /wp-content/plugins/woo-floating-cart-lite/xt-framework/includes/customizer/xirki/controls/views/radio.php
    • > /wp-content/plugins/woo-floating-cart-lite/xt-framework/includes/customizer/xirki/controls/views/select.php
    • > /wp-content/plugins/woo-floating-cart-lite/xt-framework/includes/customizer/xirki/controls/views/number.php
    • > /wp-content/plugins/woo-floating-cart-lite/xt-framework/includes/customizer/xirki/controls/views/color.php
    • > /wp-content/plugins/woo-floating-cart-lite/xt-framework/includes/customizer/xirki/controls/views/generic.php
    • > /wp-content/plugins/woo-floating-cart-lite/xt-framework/includes/customizer/xirki/controls/views/code.php
  • 98× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Xirki_Output_Property' not found in wp-content/plugins/woo-floating-cart-lite/xt-framework/includes/customizer/xirki/modules/css/property/class-xirki-output-property-background-image.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Xirki_Field' not found in wp-content/plugins/woo-floating-cart-lite/xt-framework/includes/customizer/xirki/field/class-xirki-field-code.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Xirki_Output_Property' not found in wp-content/plugins/woo-floating-cart-lite/xt-framework/includes/customizer/xirki/modules/css/property/class-xirki-output-property-background-position.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Section' not found in wp-content/plugins/woo-floating-cart-lite/xt-framework/includes/customizer/xirki/modules/custom-sections/sections/class-xirki-sections-expanded-section.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Xirki_Field' not found in wp-content/plugins/woo-floating-cart-lite/xt-framework/includes/customizer/xirki/field/class-xirki-field-custom.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Xirki_Field_Select' not found in wp-content/plugins/woo-floating-cart-lite/xt-framework/includes/customizer/xirki/field/class-xirki-field-preset.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Xirki_Field' not found in wp-content/plugins/woo-floating-cart-lite/xt-framework/includes/customizer/xirki/field/class-xirki-field-background.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Xirki_Field_Checkbox' not found in wp-content/plugins/woo-floating-cart-lite/xt-framework/includes/customizer/xirki/field/class-xirki-field-toggle.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Xirki_Output_Property' not found in wp-content/plugins/woo-floating-cart-lite/xt-framework/includes/customizer/xirki/modules/css/property/class-xirki-output-property-font-family.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Xirki_Field_Xirki_Generic' not found in wp-content/plugins/woo-floating-cart-lite/xt-framework/includes/customizer/xirki/field/class-xirki-field-url.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: Please add descriptions for these screenshots #1, #2, #3, #4, #5, #6, #7 in woo-floating-cart-lite/assets to your readme.txt
  • Tags: You are using too many tags: 13 tag instead of maximum 10
You can take inspiration from this readme.txt

woo-floating-cart-lite/xt-woo-floating-cart.php 69% from 13 tests

This is the main PHP file of "XT Floating Cart for WooCommerce" version 2.7.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woo-floating-cart-lite.php" instead of "xt-woo-floating-cart.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 243 characters long)
  • Requires at least: Required version must match 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
Everything looks great! No dangerous files found in this plugin101,031 lines of code in 681 files:
LanguageFilesBlank linesComment linesLines of code
PHP38013,15928,79253,631
JavaScript1547,0794,57326,456
JSON5008,319
Sass791,160926,807
SVG156122,815
CSS41112251,728
Markdown235201,107
XML42453141
YAML17027

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please tend to the following items
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity31.77
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity3.92
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes222
▷ Abstract classes52.25%
▷ Concrete classes21797.75%
▷ Final classes104.61%
Methods2,338
▷ Static methods33414.29%
▷ Public methods1,66871.34%
▷ Protected methods26711.42%
▷ Private methods40317.24%
Functions285
▷ Named functions19668.77%
▷ Anonymous functions8931.23%
Constants175
▷ Global constants12571.43%
▷ Class constants5028.57%
▷ Public constants50100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
61 PNG files occupy 1.01MB with 0.34MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
xt-framework/assets/css/jquery-ui/images/ui-bg_glass_75_dadada_1x400.png0.09KB0.16KB0.00%
xt-framework/includes/customizer/xirki/assets/images/2cl.png0.85KB0.27KB▼ 68.48%
xt-framework/dist/pricing/f64b1d31e75340a52b5dcf7560c5b995.png11.72KB7.39KB▼ 36.95%
xt-framework/assets/css/jquery-ui/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.08KB0.17KB0.00%
xt-framework/includes/admin-tabs/assets/images/logo.png14.85KB5.17KB▼ 65.15%