78% bc-menu-cart-woo

Code Review | Menu Bar Cart Icon For WooCommerce By Binary Carpenter

WordPress plugin Menu Bar Cart Icon For WooCommerce By Binary Carpenter scored78%from 54 tests.

About plugin

  • Plugin page: bc-menu-cart-woo
  • Plugin version: 1.49.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.3.1
  • WordPress version: 6.3.1
  • First release: May 21, 2019
  • Latest release: Oct 2, 2023
  • Number of updates: 36
  • Update frequency: every 44.3 days
  • Top authors: bc2018 (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

1,000+ active /40,002 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.29MB] [CPU: ▼1.04ms] Passed 4 tests

An overview of server-side resources used by Menu Bar Cart Icon For WooCommerce By Binary Carpenter
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2645.35 ▲4.00
Dashboard /wp-admin3.66 ▲0.3247.46 ▼15.19
Posts /wp-admin/edit.php3.72 ▲0.3652.50 ▲9.65
Add New Post /wp-admin/post-new.php6.17 ▲0.2894.20 ▲2.69
Media Library /wp-admin/upload.php3.53 ▲0.3037.82 ▲4.33
BC Menu Cart Icon /wp-admin/admin.php?page=bc_menu_bar_cart3.8951.79
Binary Carpenter /wp-admin/admin.php?page=bccomvn_wp_plugins_myn_menu3.5033.26

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Menu Bar Cart Icon For WooCommerce By Binary Carpenter
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,242 ▲49614.73 ▲0.3617.08 ▲15.2636.96 ▼7.55
Dashboard /wp-admin2,253 ▲744.87 ▼0.08111.56 ▲2.0442.82 ▼1.32
Posts /wp-admin/edit.php2,136 ▲472.03 ▼0.0039.33 ▼5.7337.25 ▼2.60
Add New Post /wp-admin/post-new.php1,556 ▲1423.11 ▲4.95601.83 ▼13.1956.00 ▲0.53
Media Library /wp-admin/upload.php1,438 ▲504.29 ▲0.08101.66 ▼9.6042.41 ▼1.58
BC Menu Cart Icon /wp-admin/admin.php?page=bc_menu_bar_cart4,0444.0677.6787.97
Binary Carpenter /wp-admin/admin.php?page=bccomvn_wp_plugins_myn_menu7922.0325.0121.09

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function BinaryCarpenter\\BC_MNC\\add_action() in wp-content/plugins/bc-menu-cart-woo/inc/Initiator.php:415
    • > PHP Fatal error
      Uncaught Error: Call to undefined function BinaryCarpenter\\BC_MNC\\add_action() in wp-content/plugins/bc-menu-cart-woo/inc/Initiator.php:415

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=bc_menu_bar_cart
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=bc_menu_bar_cart 329 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: menu, bar, basket, cart icon, woocommerce...

bc-menu-cart-woo/index.php 85% from 13 tests

"Menu Bar Cart Icon For WooCommerce By Binary Carpenter" version 1.49.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("4.7" instead of "3.0.0")
  • Main file name: Name the main plugin file the same as the plugin slug ("bc-menu-cart-woo.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected23,957 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript47,55081319,430
PHP281,3971,7003,927
PO File2208208507
SVG262091
CSS2042

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity23.50
▷ Minimum class complexity1.00
▷ Maximum class complexity134.00
Average method complexity3.70
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes22
▷ Abstract classes00.00%
▷ Concrete classes22100.00%
▷ Final classes00.00%
Methods185
▷ Static methods6937.30%
▷ Public methods17192.43%
▷ Protected methods21.08%
▷ Private methods126.49%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.00%
Constants93
▷ Global constants00.00%
▷ Class constants93100.00%
▷ Public constants93100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
bundle/images/remove_icon_2.png3.03KB2.04KB▼ 32.61%
bundle/images/remove_icon_1.png2.07KB2.14KB0.00%
bundle/images/remove_icon_3.png0.70KB0.63KB▼ 9.86%
bundle/images/remove_icon_5.png0.45KB0.17KB▼ 62.50%
bundle/images/remove_icon_4.png1.34KB1.26KB▼ 6.05%