79% woo-cart-popup

Code Review | Woo Cart Popup

WordPress plugin Woo Cart Popup scored79%from 54 tests.

About plugin

  • Plugin page: woo-cart-popup
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Jul 13, 2019
  • Latest release: Jun 15, 2023
  • Number of updates: 10
  • Update frequency: every 143.4 days
  • Top authors: thechetanvaghela (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,290 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 successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Woo Cart Popup
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.58 ▼6.01
Dashboard /wp-admin3.31 ▲0.0045.81 ▼6.55
Posts /wp-admin/edit.php3.36 ▲0.0047.63 ▼0.43
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.96 ▼1.56
Media Library /wp-admin/upload.php3.23 ▲0.0033.12 ▼3.08

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Woo Cart Popup
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.301.58 ▼0.1239.20 ▼8.85
Dashboard /wp-admin2,198 ▲215.62 ▼0.0390.09 ▼8.4741.35 ▼1.61
Posts /wp-admin/edit.php2,103 ▼02.01 ▼0.0139.82 ▲1.1534.84 ▲0.83
Add New Post /wp-admin/post-new.php1,537 ▲1118.12 ▼4.83597.45 ▼93.0267.26 ▲9.19
Media Library /wp-admin/upload.php1,400 ▼34.17 ▼0.0498.11 ▼5.9142.37 ▼2.95

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/woo-cart-popup/admin/partials/woo-cart-popup-admin-display.php
    • > /wp-content/plugins/woo-cart-popup/public/partials/woo-cart-popup-public-display.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WC() in wp-content/plugins/woo-cart-popup/public/partials/wcp-cart-content.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/woo-cart-popup/admin/class-woo-cart-setting.php:74
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/woo-cart-popup/admin/class-woo-cart-popup-admin.php:77

User-side errors Passed 1 test

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

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
7 plugin tags: woocommerce cart popup, cart popup, woocommerce cart, ajax based cart, empty cart...

woo-cart-popup/woo-cart-popup.php Passed 13 tests

This is the main PHP file of "Woo Cart Popup" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
67 characters long description:
Woo Cart Popup displays all added product items to cart in a popup.

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 plugin766 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP14170610436
CSS52746280
JavaScript587350

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity2.88
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.43
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods35
▷ Static methods25.71%
▷ Public methods2982.86%
▷ Protected methods00.00%
▷ Private methods617.14%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
public/images/cart-btn-icon.png1.11KB0.25KB▼ 77.12%