Automatically add product to cart 1.5

Does "Automatically add product to cart" work with WordPress 6.8.2 and PHP 8.1.12? A smoke test was performed on .

Summary

Errors
16PHP fatal errors
No JavaScript exceptions
1Page failed to load
  • 1 500 Internal Server Error
No resource errors
Performance

Memory usage: 7.28 KiB
The average PHP memory usage increased by this amount after activating by the plugin.

Page speed impact: insignificant.
The plugin didn't make the site noticeably slower.

Environment
WordPress version6.8.2
PHP version8.1.12
MySQL version10.6.10
PHP memory limit512M
Plugin Info
Last updated
Active installs 20+
WordPress.org page https://wordpress.org/plugins/automatically-add-product-to-cart/
Badges

WordPress compatibility badge PHP compatibility badge

Get badge code

Pages 2

Plugins ‹ Test site — WordPress

Page screenshot: Plugins ‹ Test site — WordPress
URL /wp-admin/plugins.php?plugin_status=all&paged=1&s
Requested URL /wp-admin/plugins.php?action=activate&plugin=automatically-add-product-to-cart%2Fautomatically-add-product-to-cart.php&plugin_status=all&paged=1&s&_wpnonce=5cfc183f3e
Aspect after-activation
HTTP status 200
Load time 0.287 s
Memory usage 3.54 MiB
JS errors None
Resource errors None

WordPress › Error

Page screenshot: WordPress › Error
URL /
Aspect front-page
HTTP status 500
Load time 0.054 s
Memory usage N/A
JS errors None
Resource errors None

Benchmark

URL Load time Memory usage
Inactive Active Change Inactive Active Change
/wp-admin/index.php0.339 s0.259 s-0.080 s3.51 MiB3.52 MiB+ 13.88 KiB
/wp-admin/edit.php0.191 s0.301 s+0.110 s3.57 MiB3.59 MiB+ 13.34 KiB
/wp-admin/post-new.php0.764 s0.659 s-0.105 s6.06 MiB6.08 MiB+ 17.47 KiB
/wp-admin/upload.php0.566 s0.463 s-0.103 s3.52 MiB3.52 MiB- 4.06 KiB
/wp-admin/options-writing.php0.217 s0.300 s+0.083 s3.5 MiB3.5 MiB- 72 bytes
/wp-admin/media-new.php0.273 s0.274 s+0.001 s3.49 MiB3.5 MiB+ 8.13 KiB
/wp-admin/edit-tags.php?taxonomy=category0.277 s0.215 s-0.062 s3.5 MiB3.52 MiB+ 18.8 KiB
/wp-admin/post-new.php?post_type=page0.594 s0.648 s+0.054 s6.05 MiB6.06 MiB+ 12.98 KiB
/wp-admin/options-discussion.php0.261 s0.298 s+0.037 s3.5 MiB3.5 MiB- 3.57 KiB
/wp-admin/edit-comments.php0.414 s0.225 s-0.189 s3.52 MiB3.52 MiB- 4.07 KiB
Average 0.390 s0.364 s-0.025 s4.02 MiB4.03 MiB+ 7.28 KiB

Code Statistics

Note: Third-party libraries and minified JS/CSS files are excluded from these statistics where possible, so the numbers you see here may be lower than those reported by other tools.

PHP
Language % Lines of code Comment lines Files
PHP100.0%152454
Total 152 45 4

PHP Code Analysis | More results »

Lines of code 140
Total complexity 31
Median class complexity 15.5
Median method complexity 1.0
Most complex class WC_Cmetric_Aptc
Most complex function WP_Class_Cmetric_Aptc_Settings::cmetric_aptc_add_product_to_cart()
Classes 2
Methods 14
Functions 0

Additions

Things that the plugin adds to the site. This section is not intended to be comprehensive. The test tool only looks for a few specific types of added content.

No new entries found.

PHP Error Log 160 lines

[22-Jul-2025 19:31:36 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function WC() in /wp-content/plugins/automatically-add-product-to-cart/includes/cmetric_aptc_settings_functions.php:100
Stack trace:
#0 /wp-includes/class-wp-hook.php(324): WP_Class_Cmetric_Aptc_Settings->cmetric_aptc_add_product_to_cart()
#1 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#2 /wp-includes/plugin.php(517): WP_Hook->do_action()
#3 /wp-includes/template-loader.php(13): do_action()
#4 /wp-blog-header.php(19): require_once('...')
#5 /index.php(17): require('...')
#6 {main}
  thrown in /wp-content/plugins/automatically-add-product-to-cart/includes/cmetric_aptc_settings_functions.php on line 100
[22-Jul-2025 19:31:37 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function WC() in /wp-content/plugins/automatically-add-product-to-cart/includes/cmetric_aptc_settings_functions.php:100
Stack trace:
#0 /wp-includes/class-wp-hook.php(324): WP_Class_Cmetric_Aptc_Settings->cmetric_aptc_add_product_to_cart()
#1 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#2 /wp-includes/plugin.php(517): WP_Hook->do_action()
#3 /wp-includes/template-loader.php(13): do_action()
#4 /wp-blog-header.php(19): require_once('...')
#5 /index.php(17): require('...')
#6 {main}
  thrown in /wp-content/plugins/automatically-add-product-to-cart/includes/cmetric_aptc_settings_functions.php on line 100
[22-Jul-2025 19:31:37 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function WC() in /wp-content/plugins/automatically-add-product-to-cart/includes/cmetric_aptc_settings_functions.php:100
Stack trace:
#0 /wp-includes/class-wp-hook.php(324): WP_Class_Cmetric_Aptc_Settings->cmetric_aptc_add_product_to_cart()
#1 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#2 /wp-includes/plugin.php(517): WP_Hook->do_action()
#3 /wp-includes/template-loader.php(13): do_action()
#4 /wp-blog-header.php(19): require_once('...')
#5 /index.php(17): require('...')
#6 {main}
  thrown in /wp-content/plugins/automatically-add-product-to-cart/includes/cmetric_aptc_settings_functions.php on line 100
[22-Jul-2025 19:31:38 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function WC() in /wp-content/plugins/automatically-add-product-to-cart/includes/cmetric_aptc_settings_functions.php:100
Stack trace:
#0 /wp-includes/class-wp-hook.php(324): WP_Class_Cmetric_Aptc_Settings->cmetric_aptc_add_product_to_cart()
#1 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#2 /wp-includes/plugin.php(517): WP_Hook->do_action()
#3 /wp-includes/template-loader.php(13): do_action()
#4 /wp-blog-header.php(19): require_once('...')
#5 /index.php(17): require('...')
#6 {main}
  thrown in /wp-content/plugins/automatically-add-product-to-cart/includes/cmetric_aptc_settings_functions.php on line 100
[22-Jul-2025 19:31:38 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function WC() in /wp-content/plugins/automatically-add-product-to-cart/includes/cmetric_aptc_settings_functions.php:100
Stack trace:
#0 /wp-includes/class-wp-hook.php(324): WP_Class_Cmetric_Aptc_Settings->cmetric_aptc_add_product_to_cart()
#1 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#2 /wp-includes/plugin.php(517): WP_Hook->do_action()
#3 /wp-includes/template-loader.php(13): do_action()
#4 /wp-blog-header.php(19): require_once('...')
#5 /index.php(17): require('...')
#6 {main}
  thrown in /wp-content/plugins/automatically-add-product-to-cart/includes/cmetric_aptc_settings_functions.php on line 100
[22-Jul-2025 19:31:38 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function WC() in /wp-content/plugins/automatically-add-product-to-cart/includes/cmetric_aptc_settings_functions.php:100
Stack trace:
#0 /wp-includes/class-wp-hook.php(324): WP_Class_Cmetric_Aptc_Settings->cmetric_aptc_add_product_to_cart()
#1 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#2 /wp-includes/plugin.php(517): WP_Hook->do_action()
#3 /wp-includes/template-loader.php(13): do_action()
#4 /wp-blog-header.php(19): require_once('...')
#5 /index.php(17): require('...')
#6 {main}
  thrown in /wp-content/plugins/automatically-add-product-to-cart/includes/cmetric_aptc_settings_functions.php on line 100
[22-Jul-2025 19:31:41 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function WC() in /wp-content/plugins/automatically-add-product-to-cart/includes/cmetric_aptc_settings_functions.php:100
Stack trace:
#0 /wp-includes/class-wp-hook.php(324): WP_Class_Cmetric_Aptc_Settings->cmetric_aptc_add_product_to_cart()
#1 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#2 /wp-includes/plugin.php(517): WP_Hook->do_action()
#3 /wp-includes/template-loader.php(13): do_action()
#4 /wp-blog-header.php(19): require_once('...')
#5 /index.php(17): require('...')
#6 {main}
  thrown in /wp-content/plugins/automatically-add-product-to-cart/includes/cmetric_aptc_settings_functions.php on line 100
[22-Jul-2025 19:31:41 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function WC() in /wp-content/plugins/automatically-add-product-to-cart/includes/cmetric_aptc_settings_functions.php:100
Stack trace:
#0 /wp-includes/class-wp-hook.php(324): WP_Class_Cmetric_Aptc_Settings->cmetric_aptc_add_product_to_cart()
#1 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#2 /wp-includes/plugin.php(517): WP_Hook->do_action()
#3 /wp-includes/template-loader.php(13): do_action()
#4 /wp-blog-header.php(19): require_once('...')
#5 /index.php(17): require('...')
#6 {main}
  thrown in /wp-content/plugins/automatically-add-product-to-cart/includes/cmetric_aptc_settings_functions.php on line 100
[22-Jul-2025 19:31:41 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function WC() in /wp-content/plugins/automatically-add-product-to-cart/includes/cmetric_aptc_settings_functions.php:100
Stack trace:
#0 /wp-includes/class-wp-hook.php(324): WP_Class_Cmetric_Aptc_Settings->cmetric_aptc_add_product_to_cart()
#1 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#2 /wp-includes/plugin.php(517): WP_Hook->do_action()
#3 /wp-includes/template-loader.php(13): do_action()
#4 /wp-blog-header.php(19): require_once('...')
#5 /index.php(17): require('...')
#6 {main}
  thrown in /wp-content/plugins/automatically-add-product-to-cart/includes/cmetric_aptc_settings_functions.php on line 100
[22-Jul-2025 19:31:42 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function WC() in /wp-content/plugins/automatically-add-product-to-cart/includes/cmetric_aptc_settings_functions.php:100
Stack trace:
#0 /wp-includes/class-wp-hook.php(324): WP_Class_Cmetric_Aptc_Settings->cmetric_aptc_add_product_to_cart()
#1 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#2 /wp-includes/plugin.php(517): WP_Hook->do_action()
#3 /wp-includes/template-loader.php(13): do_action()
#4 /wp-blog-header.php(19): require_once('...')
#5 /index.php(17): require('...')
#6 {main}
  thrown in /wp-content/plugins/automatically-add-product-to-cart/includes/cmetric_aptc_settings_functions.php on line 100

(+60 more lines)
See also: All tests for this plugin