84% th-all-in-one-woo-cart

Code Review | Floating Cart and Menu Cart for WooCommerce

WordPress plugin Floating Cart and Menu Cart for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: th-all-in-one-woo...
  • Plugin version: 1.1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.3
  • WordPress version: 6.3.1
  • First release: Jan 3, 2022
  • Latest release: Nov 3, 2023
  • Number of updates: 30
  • Update frequency: every 22.4 days
  • Top authors: themehunk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10,000+ active /98,172 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.66MB] [CPU: ▼8.04ms] Passed 4 tests

An overview of server-side resources used by Floating Cart and Menu Cart for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.01 ▲0.5536.44 ▼5.82
Dashboard /wp-admin4.05 ▲0.7148.34 ▼15.00
Posts /wp-admin/edit.php4.11 ▲0.7545.87 ▼2.20
Add New Post /wp-admin/post-new.php6.57 ▲0.6993.51 ▼9.13
Media Library /wp-admin/upload.php3.91 ▲0.6941.13 ▲5.00
ThemeHunk /wp-admin/admin.php?page=themehunk-plugins3.9234.85
AIO Woo Cart /wp-admin/admin.php?page=taiowc3.9139.58

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 48 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Floating Cart and Menu Cart for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6814.29 ▼0.051.60 ▼0.0840.46 ▼6.54
Dashboard /wp-admin2,205 ▲345.57 ▼0.0590.00 ▼0.8489.26 ▲43.18
Posts /wp-admin/edit.php2,128 ▲281.96 ▼0.0535.61 ▼3.2632.77 ▼3.68
Add New Post /wp-admin/post-new.php1,701 ▲16522.09 ▼0.98668.88 ▲44.7753.97 ▲5.11
Media Library /wp-admin/upload.php1,422 ▲224.19 ▼0.01102.97 ▲6.4272.38 ▲32.24
ThemeHunk /wp-admin/admin.php?page=themehunk-plugins1,2522.2328.2149.03
AIO Woo Cart /wp-admin/admin.php?page=taiowc9833.1042.1158.18

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 11× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/th-all-in-one-woo-cart/inc/themehunk-menu/th-option/tab-html.php:15
    • > PHP Warning
      include_once(THEMEHUNK_PDIRth-option/header.php): failed to open stream: No such file or directory in wp-content/plugins/th-all-in-one-woo-cart/inc/themehunk-menu/th-option/tab-html.php on line 9
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/th-all-in-one-woo-cart/inc/themehunk-menu/admin-menu.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/th-all-in-one-woo-cart/inc/themehunk-menu/admin-menu.php:4
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin-install.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/th-all-in-one-woo-cart/inc/themehunk-menu/admin-menu.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/th-all-in-one-woo-cart/inc/themehunk-menu/th-option/sidebar.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/th-all-in-one-woo-cart/inc/themehunk-menu/plugins-list.php:4
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin-install.php): failed to open stream: No such file or directory in wp-content/plugins/th-all-in-one-woo-cart/inc/themehunk-menu/admin-menu.php on line 3
    • > PHP Warning
      Use of undefined constant THEMEHUNK_PDIR - assumed 'THEMEHUNK_PDIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/th-all-in-one-woo-cart/inc/themehunk-menu/th-option/tab-html.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/th-all-in-one-woo-cart/inc/themehunk-menu/th-option/header.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: woocommerce cart, woocommerce, floating cart, ajax cart, cart...

th-all-in-one-woo-cart/th-all-in-one-woo-cart.php 85% from 13 tests

The main PHP file in "Floating Cart and Menu Cart for WooCommerce" ver. 1.1.8 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: Please keep the plugin description shorter than 140 characters (currently 367 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected8,155 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript57041,0262,604
PHP151,0691282,574
CSS6254722,437
PO File1241246540

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity34.17
▷ Minimum class complexity2.00
▷ Maximum class complexity118.00
Average method complexity3.11
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods92
▷ Static methods44.35%
▷ Public methods8491.30%
▷ Protected methods00.00%
▷ Private methods88.70%
Functions12
▷ Named functions975.00%
▷ Anonymous functions325.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
16 PNG files occupy 0.20MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon-6.png7.41KB4.65KB▼ 37.23%
inc/themehunk-menu/th-option/assets/images/icon.png14.32KB7.45KB▼ 47.95%
images/icon-4.png3.23KB2.05KB▼ 36.45%
images/th-logo.png3.35KB1.55KB▼ 53.63%
images/fixed-cart.png1.72KB0.90KB▼ 47.99%