84% woocommerce-woocart-popup-lite

Code Review | Popup Cart Lite for WooCommerce

WordPress plugin Popup Cart Lite for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: woocommerce-wooca...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9.1
  • WordPress version: 6.3.1
  • First release: Jul 24, 2014
  • Latest release: Jun 22, 2016
  • Number of updates: 91
  • Update frequency: every 7.7 days
  • Top authors: Festi-Team (100%)

Code review

54 tests

User reviews

18 reviews

Install metrics

1,000+ active /31,883 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.22ms] Passed 4 tests

Analyzing server-side resources used by Popup Cart Lite for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.44 ▼0.41
Dashboard /wp-admin3.31 ▲0.0057.98 ▲6.01
Posts /wp-admin/edit.php3.36 ▲0.0046.81 ▼2.61
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.90 ▼1.52
Media Library /wp-admin/upload.php3.23 ▲0.0037.44 ▼0.33

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 96 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Popup Cart Lite for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.27 ▼0.121.83 ▼0.1444.71 ▲0.14
Dashboard /wp-admin2,192 ▲125.74 ▲0.0790.65 ▼1.2739.96 ▼3.52
Posts /wp-admin/edit.php2,100 ▼62.00 ▼0.0236.98 ▼5.1236.51 ▼1.14
Add New Post /wp-admin/post-new.php1,526 ▼223.40 ▲0.29667.74 ▼12.9449.46 ▼15.95
Media Library /wp-admin/upload.php1,394 ▼94.20 ▼0.0598.17 ▼2.0345.76 ▲0.60

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WooCartPopUpFestiPlugin' not found in wp-content/plugins/woocommerce-woocart-popup-lite/common/WooCartPopUpBackendFestiPlugin.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WooCartPopUpFestiPlugin' not found in wp-content/plugins/woocommerce-woocart-popup-lite/common/WooCartPopUpFrontendFestiPlugin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_site_url() in wp-content/plugins/woocommerce-woocart-popup-lite/common/FestiPlugin.php:44

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (How it looks like after click on Add to Cart button), #2 (Settings)
The official readme.txt might help

woocommerce-woocart-popup-lite/plugin.php 92% from 13 tests

The main PHP script in "Popup Cart Lite for WooCommerce" version 1.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woocommerce-woocart-popup-lite.php" instead of "plugin.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
Everything looks great! No dangerous files found in this plugin5,922 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
PHP27418143,536
CSS6148471,508
JavaScript78820755
PO File15265123

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.19
Average class complexity14.60
▷ Minimum class complexity1.00
▷ Maximum class complexity32.00
Average method complexity1.64
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes4
▷ Abstract classes125.00%
▷ Concrete classes375.00%
▷ Final classes00.00%
Methods108
▷ Static methods00.00%
▷ Public methods8175.00%
▷ Protected methods87.41%
▷ Private methods1917.59%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
44 PNG files occupy 0.16MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
static/images/color_picker/custom_hsb_h.png0.95KB0.73KB▼ 23.40%
static/images/color_picker/colorpicker_hsb_b.png0.95KB0.76KB▼ 19.48%
static/images/color_picker/colorpicker_overlay.png10.11KB8.24KB▼ 18.50%
static/images/slider/ui-bg_glass_100_fdf5ce_1x400.png0.34KB0.16KB▼ 54.02%
static/images/color_picker/select.png0.49KB0.33KB▼ 33.40%