78% custom-woo-cart-button

Code Review | Ajax Side Cart Button for WooCommerce eshop

WordPress plugin Ajax Side Cart Button for WooCommerce eshop scored78%from 54 tests.

About plugin

  • Plugin page: custom-woo-cart-b...
  • Plugin version: 1.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2-6.2
  • WordPress version: 6.3.1
  • First release: Jun 3, 2020
  • Latest release: May 5, 2023
  • Number of updates: 14
  • Update frequency: every 76.1 days
  • Top authors: taz_bambu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /902 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▲0.66ms] Passed 4 tests

Server-side resources used by Ajax Side Cart Button for WooCommerce eshop
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0346.99 ▲2.74
Dashboard /wp-admin3.37 ▲0.0758.86 ▲3.76
Posts /wp-admin/edit.php3.48 ▲0.1356.06 ▲5.02
Add New Post /wp-admin/post-new.php5.95 ▲0.0692.77 ▼5.47
Media Library /wp-admin/upload.php3.27 ▲0.0440.81 ▲1.60
Custom Cart /wp-admin/admin.php?page=custom-woocommerce-cart-button3.2739.11

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 20 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
woocommerce_enable_ajax_add_to_cart
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Ajax Side Cart Button for WooCommerce eshop
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,117 ▲35615.19 ▲0.845.94 ▲4.1044.45 ▲0.49
Dashboard /wp-admin2,440 ▲2636.35 ▲0.81123.06 ▲18.8792.92 ▲49.27
Posts /wp-admin/edit.php2,365 ▲2683.51 ▲1.4853.96 ▲18.7079.34 ▲46.49
Add New Post /wp-admin/post-new.php1,637 ▲10123.16 ▼0.16662.83 ▼21.1337.13 ▼17.53
Media Library /wp-admin/upload.php1,499 ▲994.30 ▲0.0886.15 ▼25.4077.16 ▲30.20
Custom Cart /wp-admin/admin.php?page=custom-woocommerce-cart-button1,3583.1743.8464.07

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • woocommerce_enable_ajax_add_to_cart
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/custom-woo-cart-button/css/frontend.php:164

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=custom-woocommerce-cart-button
    • > Javascript (severe) in unknown
    /wp-content/plugins/custom-woo-cart-button/js/backend.js 52:40 Uncaught TypeError: $(...).tabs is not a function

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: floating cart, popup, boost sales, ajax, cart

custom-woo-cart-button/custom-woo-cart-button.php 92% from 13 tests

The main PHP file in "Ajax Side Cart Button for WooCommerce eshop" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Requires at least: The required version number must match the one declared in readme.txt ("3.0.1" instead of "2.2")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected1,723 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP324722708
SVG100685
JavaScript2713188
CSS2196119
PO File13523

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity25.00
▷ Minimum class complexity6.00
▷ Maximum class complexity44.00
Average method complexity2.37
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods35
▷ Static methods00.00%
▷ Public methods35100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/customWooCommerceButton.png25.00KB11.64KB▼ 53.43%
images/custom-woocommerce-cart-button-pro.png31.00KB13.54KB▼ 56.30%
images/extendwp.png5.75KB3.37KB▼ 41.46%