84% woo-sp-cart-lite

Code Review | WooCommerce Floating Cart Lite

WordPress plugin WooCommerce Floating Cart Lite scored84%from 54 tests.

About plugin

  • Plugin page: woo-sp-cart-lite
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.3-5.0.2
  • WordPress version: 6.3.1
  • First release: Dec 25, 2018
  • Latest release: Jan 29, 2019
  • Number of updates: 8
  • Update frequency: every 4.4 days
  • Top authors: spoot1986 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,785 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼5.64ms] Passed 4 tests

A check of server-side resources used by WooCommerce Floating Cart Lite
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1939.62 ▼3.38
Dashboard /wp-admin3.49 ▲0.1844.13 ▼3.88
Posts /wp-admin/edit.php3.60 ▲0.2546.59 ▼2.75
Add New Post /wp-admin/post-new.php6.07 ▲0.1884.50 ▼12.54
Media Library /wp-admin/upload.php3.41 ▲0.1837.36 ▼0.38

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_woo_sp_cart_button_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Floating Cart Lite
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲6413.28 ▼1.022.21 ▲0.2440.13 ▼3.81
Dashboard /wp-admin2,206 ▲155.83 ▲0.98107.04 ▲4.2838.47 ▼5.28
Posts /wp-admin/edit.php2,089 ▼02.04 ▼0.0139.32 ▼3.7335.73 ▲0.79
Add New Post /wp-admin/post-new.php1,534 ▲123.32 ▲0.04596.91 ▼75.9653.14 ▼4.65
Media Library /wp-admin/upload.php1,382 ▼94.23 ▲0.0593.54 ▼17.6340.86 ▼9.72

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
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_woo_sp_cart_button_widget
    • theysaidso_admin_options
    • can_compress_scripts

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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-sp-cart-lite/woo-sp-cart-scripts.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-sp-cart-lite/woo-sp-cart-styles.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-sp-cart-lite/woo-sp-cart-functions.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-sp-cart-lite/woo-sp-cart-widgets.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/woo-sp-cart-lite/woo-sp-cart-lite.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/woo-sp-cart-lite/woo-sp-cart-classes.php:30

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (settings01), #2 (settings02), #3 (button01)
You can look at the official readme.txt

woo-sp-cart-lite/woo-sp-cart-lite.php 92% from 13 tests

The principal PHP file in "WooCommerce Floating Cart Lite" v. 1.0.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin1,121 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP612742676
CSS23314300
PO File14798113
JavaScript29132

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity86.50
▷ Minimum class complexity13.00
▷ Maximum class complexity160.00
Average method complexity9.55
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.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
3 PNG files occupy 0.05MB with 0.04MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png7.89KB1.67KB▼ 78.91%
screenshot-2.png32.32KB9.48KB▼ 70.68%
screenshot-1.png15.07KB4.43KB▼ 70.60%