84% woo-mini-cart-drawer

Code Review | Mini Cart Drawer For WooCommerce

WordPress plugin Mini Cart Drawer For WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: woo-mini-cart-drawer
  • Plugin version: 3.3.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.2
  • WordPress version: 6.3.1
  • First release: Oct 14, 2019
  • Latest release: Apr 11, 2023
  • Number of updates: 72
  • Update frequency: every 17.7 days
  • Top authors: sarwarcse (97.22%)appsbd (4.17%)

Code review

54 tests

User reviews

5 reviews

Install metrics

900+ active /15,656 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.30MB] [CPU: ▼3.91ms] Passed 4 tests

Server-side resources used by Mini Cart Drawer For WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.80 ▲0.3338.78 ▼2.17
Dashboard /wp-admin3.61 ▲0.2750.77 ▼12.25
Posts /wp-admin/edit.php3.66 ▲0.3148.09 ▲1.21
Add New Post /wp-admin/post-new.php6.21 ▲0.33102.54 ▲9.93
Media Library /wp-admin/upload.php3.53 ▲0.3133.23 ▼2.41

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 233 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Mini Cart Drawer For WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,947 ▲18613.59 ▼0.9811.00 ▲9.5232.59 ▼7.17
Dashboard /wp-admin2,263 ▲855.64 ▲0.0590.39 ▼12.4159.35 ▲18.66
Posts /wp-admin/edit.php2,174 ▲742.17 ▲0.1538.19 ▲0.2643.54 ▲7.78
Add New Post /wp-admin/post-new.php1,594 ▲18823.34 ▲5.49589.37 ▼44.8150.13 ▲4.08
Media Library /wp-admin/upload.php1,476 ▲764.26 ▲0.1499.45 ▼10.7856.96 ▲10.69

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 22× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/woo-mini-cart-drawer/template/popup.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'AppsBDLiteModule' not found in wp-content/plugins/woo-mini-cart-drawer/modules/APBDWCM_discountmanager.php:10
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/woo-mini-cart-drawer/woo-mini-cart-drawer.php on line 20
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/woo-mini-cart-drawer/woo-mini-cart-drawer.php on line 20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function APBD_LoadCore() in wp-content/plugins/woo-mini-cart-drawer/core/AppsBDModel.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function APBD_LoadCore() in wp-content/plugins/woo-mini-cart-drawer/core/AppsBDKarnelLite.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'APBDWCM_aboutus' not found in wp-content/plugins/woo-mini-cart-drawer/views/apbdwcm_aboutus/main.php:6
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-mini-cart-drawer/woo-mini-cart-drawer.php on line 20
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/woo-mini-cart-drawer/libs/APBD_Content_Switch_Control.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/woo-mini-cart-drawer/template/popup-msg.php:10

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 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please add descriptions for these screenshots #1, #10, #2, #3, #4, #5, #5, #6, #7, #8, #9 in woo-mini-cart-drawer/assets to your readme.txt
Please take inspiration from this readme.txt

woo-mini-cart-drawer/woo-mini-cart-drawer.php 92% from 13 tests

Analyzing the main PHP file in "Mini Cart Drawer For WooCommerce" version 3.3.1
Please take the time to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.4" instead of "3.3")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin58,097 lines of code in 181 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript977,6415,74032,148
CSS401,09420613,982
PHP308356036,596
SVG8002,924
JSON2001,861
Sass370584
LESS1002

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity38.45
▷ Minimum class complexity1.00
▷ Maximum class complexity362.00
Average method complexity2.72
▷ Minimum method complexity1.00
▷ Maximum method complexity55.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes210.00%
▷ Concrete classes1890.00%
▷ Final classes00.00%
Methods432
▷ Static methods5111.81%
▷ Public methods40092.59%
▷ Protected methods225.09%
▷ Private methods102.31%
Functions69
▷ Named functions6797.10%
▷ Anonymous functions22.90%
Constants9
▷ Global constants111.11%
▷ Class constants888.89%
▷ Public constants8100.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
6 PNG files occupy 0.17MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/recommended/multicurrency.png7.13KB3.07KB▼ 56.97%
images/recommended/woolentor.png3.73KB3.92KB0.00%
images/onlystyle.png57.11KB25.21KB▼ 55.86%
images/menu_icon.png2.31KB1.71KB▼ 25.92%
images/recommended/mini-cart.png38.83KB17.52KB▼ 54.87%