90% sliding-cart-for-woocommerce

Code Review | Sliding Cart for WooCommerce

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

About plugin

  • Plugin page: sliding-cart-for-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 30, 2022
  • Latest release: Mar 30, 2022
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: royho (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,267 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

This is a short check of server-side resources used by Sliding Cart for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.10 ▼4.85
Dashboard /wp-admin3.32 ▲0.0144.54 ▼9.60
Posts /wp-admin/edit.php3.37 ▲0.0145.31 ▲0.08
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.12 ▼3.79
Media Library /wp-admin/upload.php3.24 ▲0.0133.71 ▲0.61

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Sliding Cart for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲9813.73 ▼0.651.96 ▲0.2047.30 ▼2.12
Dashboard /wp-admin2,214 ▲264.94 ▲0.04109.24 ▼8.7139.49 ▼6.25
Posts /wp-admin/edit.php2,096 ▲72.05 ▲0.0339.07 ▲0.8533.77 ▲0.61
Add New Post /wp-admin/post-new.php1,541 ▲2123.66 ▲0.57651.77 ▲31.6951.91 ▼1.43
Media Library /wp-admin/upload.php1,396 ▲84.32 ▲0.1196.53 ▼1.3242.15 ▼1.31

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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 on the user side

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: woocommerce, products, roy ho, cart, sliding cart

sliding-cart-for-woocommerce/sliding-cart-for-woocommerce.php Passed 13 tests

The main PHP file in "Sliding Cart for WooCommerce" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
33 characters long description:
Adds a sliding cart to your shop.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin6,082 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript61,4454,5315,720
PHP561168228
CSS522134

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity4.33
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.71
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods14
▷ Static methods17.14%
▷ Public methods1392.86%
▷ Protected methods17.14%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin