84% woocommerce-cart-tab

Code Review | WooCommerce Cart Tab

WordPress plugin WooCommerce Cart Tab scored 84% from 54 tests.

About plugin

  • Plugin page: woocommerce-cart-tab
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9.6
  • WordPress version: 6.3.1
  • First release: Feb 11, 2013
  • Latest release: Jul 5, 2018
  • Number of updates: 26
  • Update frequency: every 75.8 days
  • Top authors: jameskoster (100%)

Code review

54 tests

User reviews

59 reviews

Install metrics

7,000+ active / 255,209 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
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by WooCommerce Cart Tab
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.37 ▼1.14
Dashboard /wp-admin3.31 ▲0.0144.78 ▼3.85
Posts /wp-admin/edit.php3.36 ▲0.0049.12 ▼0.37
Add New Post /wp-admin/post-new.php5.90 ▲0.0084.43 ▼12.58
Media Library /wp-admin/upload.php3.24 ▲0.0034.11 ▲2.09

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Cart Tab
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.21 ▼1.591.69 ▲0.0243.13 ▲3.47
Dashboard /wp-admin2,206 ▲244.84 ▼0.98109.17 ▼0.1041.13 ▼1.82
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0138.66 ▼2.8335.52 ▼0.95
Add New Post /wp-admin/post-new.php1,514 ▼1917.41 ▼5.81634.33 ▲28.6856.47 ▼0.76
Media Library /wp-admin/upload.php1,391 ▼04.23 ▲0.0098.54 ▼5.0545.09 ▲1.10

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/woocommerce-cart-tab/cart-tab.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: cart, ecommerce, woocommerce

woocommerce-cart-tab/cart-tab.php 92% from 13 tests

"WooCommerce Cart Tab" version 1.1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("woocommerce-cart-tab.php" instead of "cart-tab.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin915 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
Sass2570316
CSS2180287
PHP675167259
JavaScript2172953

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.24
Average class complexity3.33
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.64
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin