78% floating-cart-product-for-woocommerce

Code Review | Floating Cart Product For Woocommerce

WordPress plugin Floating Cart Product For Woocommerce scored78%from 54 tests.

About plugin

  • Plugin page: floating-cart-pro...
  • Plugin version: 1.0
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 6, 2022
  • Latest release: Sep 26, 2023
  • Number of updates: 8
  • Update frequency: every 56.0 days
  • Top authors: silverplugins217 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /925 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.56MB] [CPU: ▲16.01ms] Passed 4 tests

A check of server-side resources used by Floating Cart Product For Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.99 ▲0.5354.61 ▲11.21
Dashboard /wp-admin3.88 ▲0.5378.49 ▲12.69
Posts /wp-admin/edit.php3.99 ▲0.6380.21 ▲31.21
Add New Post /wp-admin/post-new.php6.48 ▲0.59122.46 ▲8.92
Media Library /wp-admin/upload.php3.82 ▲0.5972.19 ▲35.34
Floating Cart /wp-admin/admin.php?page=floating-cart3.7964.39

Server storage [IO: ▲0.54MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
These are issues you should consider
  • You have illegally modified 1 file (4.00KB) outside of "wp-content/plugins/floating-cart-product-for-woocommerce/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 38 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Floating Cart Product For Woocommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,617 ▼14414.00 ▼0.299.07 ▲7.1914.54 ▼22.70
Dashboard /wp-admin2,250 ▲475.11 ▲0.23116.14 ▲7.1542.21 ▼2.82
Posts /wp-admin/edit.php2,134 ▲522.34 ▲0.3044.39 ▲8.1737.45 ▲0.29
Add New Post /wp-admin/post-new.php1,560 ▲2018.82 ▲0.53620.07 ▲7.5644.50 ▼10.39
Media Library /wp-admin/upload.php1,432 ▲294.44 ▲0.16103.86 ▼5.9348.70 ▼3.07
Floating Cart /wp-admin/admin.php?page=floating-cart5,7864.43202.2355.01

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 9× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/floating-cart-product-for-woocommerce/main/frontend/fcpfw_front.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/floating-cart-product-for-woocommerce/main/resource/fcpfw_load_js_css.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/floating-cart-product-for-woocommerce/floating-cart-product-for-woocommerce.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/floating-cart-product-for-woocommerce/main/resource/fcpfw-installation-require.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/floating-cart-product-for-woocommerce/main/frontend/fcpfw_head_foot.php:221
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/floating-cart-product-for-woocommerce/main/resource/fcpfw-language.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/floating-cart-product-for-woocommerce/main/backend/fcpfw_svg.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/floating-cart-product-for-woocommerce/main/backend/fcpfw_backend.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/floating-cart-product-for-woocommerce/main/backend/fcpfw_comman.php:117

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=floating-cart
    • > Network (severe)
    wp-content/plugins/woocommerce/assets/css/admin.css?ver=1.0 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 18 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=floating-cart
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.defaultLabel is deprecated since version 5.5.0! Use wp.i18n instead.
  • 18 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=floating-cart
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.pick is deprecated since version 5.5.0! Use wp.i18n instead.
  • 18 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=floating-cart
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.defaultString is deprecated since version 5.5.0! Use wp.i18n instead.
  • 18 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=floating-cart
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.defaultAriaLabel is deprecated since version 5.5.0! Use wp.i18n instead.

Optimizations

Plugin configuration 93% 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 to be fixed:
  • Contributors: Plugin contributors not specified
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Floting Cart General Setting.), #2 (Floting Cart Custom Style Setting.), #3 (Floting Cart Translations Setting.), #4 (Show Cart Basket.), #5 (Show Floting Cart.)
The official readme.txt is a good inspiration

floating-cart-product-for-woocommerce/floating-cart-product-for-woocommerce.php Passed 13 tests

"Floating Cart Product For Woocommerce" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
61 characters long description:
This plugin allows you to Create Sidebar cart in WooCommerce.

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
Good job! No executable or dangerous file extensions detected6,635 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP9374392,698
JavaScript56281,1142,640
CSS8431261,150
SVG603147

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions31
▷ Named functions31100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
7 PNG files occupy 0.10MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/ShoppingCart2-512.png31.67KB11.09KB▼ 64.97%
assets/images/support.png6.44KB5.59KB▼ 13.09%
assets/images/review.png15.87KB11.90KB▼ 25.01%
assets/images/star.png39.75KB10.35KB▼ 73.95%
assets/images/cancel-music.png0.52KB0.37KB▼ 28.52%