90% sidebar-cart

Code Review | Sidebar Cart for WooCommerce

WordPress plugin Sidebar Cart for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: sidebar-cart
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 11, 2021
  • Latest release: Aug 15, 2023
  • Number of updates: 14
  • Update frequency: every 50.6 days
  • Top authors: ahmadshyk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /1,463 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.03ms] Passed 4 tests

Server-side resources used by Sidebar Cart for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0141.21 ▼1.69
Dashboard /wp-admin3.32 ▲0.0143.42 ▼5.25
Posts /wp-admin/edit.php3.37 ▲0.0148.59 ▼1.98
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.51 ▼3.19
Media Library /wp-admin/upload.php3.24 ▲0.0137.36 ▲2.96

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
scw_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Sidebar Cart for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9614.47 ▲0.171.99 ▲0.1944.77 ▼4.34
Dashboard /wp-admin2,212 ▲214.86 ▼0.05101.80 ▼14.8544.05 ▼1.92
Posts /wp-admin/edit.php2,095 ▲62.05 ▲0.0440.50 ▲1.3038.36 ▲1.00
Add New Post /wp-admin/post-new.php1,539 ▲2523.25 ▲5.66675.06 ▼4.3756.61 ▼3.23
Media Library /wp-admin/upload.php1,397 ▲124.24 ▲0.01100.24 ▼3.2345.19 ▲0.55

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_recent-comments
    • scw_options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
5 plugin tags: slide, side cart, sliding cart, woocommerce, minicart

sidebar-cart/sidebar-cart.php Passed 13 tests

The main file in "Sidebar Cart for WooCommerce" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
66 characters long description:
The simple plugin to add Sidebar Cart on your WooCommerce website.

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
Good job! No executable or dangerous file extensions detected746 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP63134423
CSS2200295
JavaScript11028

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity2.10
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/cart.png0.44KB0.54KB0.00%