• Resolved Leo Santis

    (@leosantis)


    I’ve been using WP-Optimize for about 2 years and it’s been working great.

    As a good practice I was reviewing PHP Error logs and I can see hundreds of such errors:

    PHP Warning:  Undefined property: stdClass::$plugin_status in /home/wp-content/plugins/wp-optimize/includes/class-wp-optimize-commands.php on line 1341

    PHP Warning: Undefined property: stdClass::$plugin in /home/wp-includes/class-wp-list-util.php on line 168

    Both files were not edited from originals. It may look those errors are not connected but always appear at the same time.

    Tried to delete and reinstall the plugin, clearing caches but nothing changes.

    404 Performance is enabled and as soon as I check this page PHP Error log file are feed with such errors.

    I’ve checked around line 1341 on class-wp-optimize-commands.php and it seems related to the plugin status setup. Nothing unusual as plugin setup seems to be fine.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Support jbgupdraft

    (@jbgupdraft)

    Hi,

    Thank you for reporting this! I am also able to produce the same error on one of my sites when looking at the Database optimization page but I can’t produce the error on some of my other sites so I think it might be related to the set of plugins currently installed on the site.

    I’m going to send this information over to our developers to take a look at so we can fix those errors.

    Thread Starter Leo Santis

    (@leosantis)

    Hi @jbgupdraft ,

    You gave me an idea and as I had one site with WP-Optmize almost without any plugins, very basic board to be honest, cheking PHP Error log for this one, and there weren1t such errors for this one.

    So, I was installing on this one a couple of plugins I believe Asset Clean up plugin is the one conflicting with WP-Optimize.

    I had to use Asset Clean up, mostly to remove unused scripts and CSS from theme, as well as Contact Form 7 (sitewise) to improve page speed.

    Plugin Support jbgupdraft

    (@jbgupdraft)

    Hi Leo,

    Thanks for the update! Our developers are currently aware of the issue and are working on a fix for the warnings but thankfully in my testing this warning does not have any impact on functionality it just appears to be a warning when trying to determine the status of other plugins that are / were installed on the site.

    davidblood

    (@davidblood)

    Hi,

    Was just getting this error as of yesterday, in my PHP’s error_log. Thought I’d do a Google Search and this topic came up.

    [20-Nov-2025 19:18:59 UTC] PHP Warning: Undefined property: stdClass::$plugin_status in /wp-content/plugins/wp-optimize/includes/class-wp-optimize-commands.php on line 1341
    [20-Nov-2025 19:18:59 UTC] PHP Warning: Undefined property: stdClass::$plugin_status in /wp-content/plugins/wp-optimize/includes/class-wp-optimize-commands.php on line 1341

    Glad to hear it doesn’t impact the plugin’s functionality.

    Plugin Support jbgupdraft

    (@jbgupdraft)

    Hi @davidblood,

    Can you let me know what version of WP-Optimize you currently have installed when these errors came up?

    Thanks!

    davidblood

    (@davidblood)

    Hi @jbgupdraft

    Absolutely I updated to v4.3.1 for the error to appear (I was on 4.3.0 error free)

    Plugin Support jbgupdraft

    (@jbgupdraft)

    Hi @davidblood,

    Thanks so much for the info. I’ll run some more tests with 4.3.1 as I was seeing the errors on 4.3.0 and report my findings to our development team.

    Thank you!

    Thread Starter Leo Santis

    (@leosantis)

    Maybe I should open a new topic but at least is a feedback for the initial post.

    As a matter of fact, when I upgraded from 4.3.0 to 4.3.1 issues I have reported initially were solved.

    But right after upgrading, Apache error log was getting populated with Database errors.

    [lsapi:error] [pid 2259:tid 2278] [client MY SERVER IP] [host domaini.com] Backend fatal error: PHP Fatal error:  Uncaught Error: Call to undefined function wp_optimize_minify_config() in /public_html/wp-content/plugins/wp-optimize/includes/class-wpo-page-optimizer.php:61\nStack trace:\n#0 /public_html/wp-content/plugins/wp-optimize/includes/class-wpo-page-optimizer.php(26): WPO_Page_Optimizer->maybe_remove_unused_css('')\n#1 [internal function]: WPO_Page_Optimizer->optimize('', 9)\n#2 /home/cpcinst1010/public_html/wp-includes/functions.php(5471): ob_end_flush()\n#3 /public_html/wp-includes/class-wp-hook.php(324): wp_ob_end_flush_all('')\n#4 /public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)\n#5/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)\n#6 /public_html/wp-includes/load.php(1304): do_action('shutdown')\n#7 [internal function]: shutdown_action_hook()\n#8 {main}\n  thrown in /public_html/wp-content/plugins/wp-optimize/includes/class-wpo-page-optimizer.php on line 61\n

    This is happening only one website; other seems to be OK so far. Funny, I don’t even use Minify cache on this one.

    Check also WordPress Error log and could see some Database errors as well:

    WordPress database error Commands out of sync; you can't run this command now for query SELECT a.action_id FROM wp_actionscheduler_actions a WHERE 1=1 AND a.hook='wc_schedule_pending_batch_processes' AND a.status IN ('in-progress', 'pending') LIMIT 0, 1 made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, Automattic\WooCommerce\Internal\BatchProcessing\BatchProcessingController->Automattic\WooCommerce\Internal\BatchProcessing\{closure}, Automattic\WooCommerce\Internal\BatchProcessing\BatchProcessingController->remove_or_retry_failed_processors, call_user_func, as_has_scheduled_action, ActionScheduler_Store->query_action, ActionScheduler_DBStore->query_actions

    WordPress database error Commands out of sync; you can't run this command now for query SELECT option_value FROM wp_options WHERE option_name = 'action_scheduler_lock_async-request-runner' made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, ActionScheduler_QueueRunner->maybe_dispatch_async_request, ActionScheduler_Lock->is_locked, ActionScheduler_OptionLock->get_expiration, ActionScheduler_OptionLock->get_existing_lock

    WordPress database error Commands out of sync; you can't run this command now for query SELECT option_value FROM wp_options WHERE option_name = 'action_scheduler_lock_async-request-runner' made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, ActionScheduler_QueueRunner->maybe_dispatch_async_request, ActionScheduler_OptionLock->set, ActionScheduler_OptionLock->get_existing_lock

    WordPress database error Commands out of sync; you can't run this command now for query SHOW FULL COLUMNS FROM
    wp_options made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, ActionScheduler_QueueRunner->maybe_dispatch_async_request, ActionScheduler_OptionLock->set

    Hope this helps to track it.

    davidblood

    (@davidblood)

    @leosantis that looks like the action scheduler that WooCommerce and those plugins using background tasks. For me it was PMPro.

    Async: Locks in wp_options table related to Action Scheduler action_scheduler_lock_async-request-runner maybe same as me? I had some of these issues before and used the define('WP_ALLOW_REPAIR', true); with /wp-admin/maint/repair.php resolved it for me.

    Thread Starter Leo Santis

    (@leosantis)

    Hi @davidblood I did something simular as you mentioned. At least so far none errors like that showed up again.

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘PHP Warning: Undefined property’ is closed to new replies.