83% cartstack-for-woocommerce

Code Review | CartStack for WooCommerce

WordPress plugin CartStack for WooCommerce scored 83% from 54 tests.

About plugin

  • Plugin page: cartstack-for-woo...
  • Plugin version: 1.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3.1
  • WordPress version: 6.3.1
  • First release: Mar 29, 2016
  • Latest release: Sep 26, 2023
  • Number of updates: 22
  • Update frequency: every 124.7 days
  • Top authors: cartstack (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active / 1,903 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.71ms] Passed 4 tests

A check of server-side resources used by CartStack for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.37 ▼0.95
Dashboard /wp-admin3.33 ▲0.0344.22 ▼5.11
Posts /wp-admin/edit.php3.38 ▲0.0348.29 ▲1.50
Add New Post /wp-admin/post-new.php5.91 ▲0.0383.57 ▼8.76
Media Library /wp-admin/upload.php3.26 ▲0.0334.42 ▼0.03
CartStack /wp-admin/admin.php?page=cartstack3.2330.91

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

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

Browser metrics Passed 4 tests

CartStack for WooCommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲7013.65 ▼1.111.62 ▼0.1639.14 ▼6.34
Dashboard /wp-admin2,208 ▲175.79 ▲0.9295.19 ▼7.6735.46 ▼5.12
Posts /wp-admin/edit.php2,093 ▲11.97 ▼0.0040.06 ▲5.3235.39 ▲3.21
Add New Post /wp-admin/post-new.php1,539 ▲1823.08 ▼0.10666.97 ▼9.2550.21 ▼4.72
Media Library /wp-admin/upload.php1,393 ▲54.24 ▲0.0696.06 ▼6.5845.32 ▼0.99
CartStack /wp-admin/admin.php?page=cartstack8871.9028.6424.14

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/cartstack-for-woocommerce/CartStack.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Donate link: Invalid URI ("")
  • Tags: You are using too many tags: 11 tag instead of maximum 10
The official readme.txt might help

cartstack-for-woocommerce/CartStack.php 92% from 13 tests

The main PHP script in "CartStack for WooCommerce" version 1.1.4 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("cartstack-for-woocommerce.php" instead of "CartStack.php")

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
Good job! No executable or dangerous file extensions detected366 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP18351256
CSS3281889
JavaScript392321

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity26.00
▷ Minimum class complexity26.00
▷ Maximum class complexity26.00
Average method complexity2.09
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods2086.96%
▷ Protected methods00.00%
▷ Private methods313.04%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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 PNG file occupies 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/help.png37.27KB20.76KB▼ 44.30%