62% wc-floating-cart

Code Review | Floating Cart for WooCommerce

WordPress plugin Floating Cart for WooCommerce scored62%from 54 tests.

About plugin

  • Plugin page: wc-floating-cart
  • Plugin version: 2.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 4, 2023
  • Latest release: Jun 10, 2023
  • Number of updates: 18
  • Update frequency: every 5.4 days
  • Top authors: walexconcepts (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /578 total downloads

Benchmarks

Plugin footprint 65% 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: ▼1.93MB] [CPU: ▼48.82ms] Passed 4 tests

Server-side resources used by Floating Cart for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.403.98 ▼35.97
Dashboard /wp-admin2.08 ▼1.227.32 ▼40.73
Posts /wp-admin/edit.php2.08 ▼1.275.94 ▼38.41
Add New Post /wp-admin/post-new.php2.08 ▼3.815.46 ▼80.16
Media Library /wp-admin/upload.php2.08 ▼1.156.08 ▼32.79
Help /wp-admin/admin.php?page=help_floating_cart2.085.73

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 16 new files
Database: 1 new table, 6 new options
New tables
wc_floating_woocommerce_cart
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Floating Cart for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,569 ▼18813.58 ▼0.697.45 ▲5.510.08 ▼40.85
Dashboard /wp-admin2,230 ▲424.86 ▼1.04106.61 ▼0.7596.95 ▲57.90
Posts /wp-admin/edit.php2,110 ▲242.13 ▲0.1234.53 ▼0.0129.88 ▼5.33
Add New Post /wp-admin/post-new.php1,535 ▲1417.72 ▼5.68761.06 ▲129.8370.02 ▲11.64
Media Library /wp-admin/upload.php1,415 ▲274.12 ▼0.19104.16 ▲4.3950.23 ▲5.22
Help /wp-admin/admin.php?page=help_floating_cart8562.0223.9824.25

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=help_floating_cart
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

SRP 0% 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
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wc-floating-cart/admin/floating_cart_help.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wc-floating-cart/include/floating_cart_myform.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: checkout, products, responsive, basket, shopping...

wc-floating-cart/index.php 92% from 13 tests

The principal PHP file in "Floating Cart for WooCommerce" v. 2.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wc-floating-cart.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected4,338 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
CSS61,853254,169
PHP35810158
SQL16011

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
adminicon.png12.10KB0.99KB▼ 91.80%