• Hello,
    I noticed that the plugin still loads jQuery, even though modern WordPress (especially FSE) no longer depends on it and uses React instead. Unfortunately, this negatively impacts performance scores in tools like Google PageSpeed.

    When I reviewed the plugin code, the only jQuery-related usage I found was:

    jQuery(function ( $ ) {
    $( document.body ).on('added_to_cart', ...);
    $( 'button, :submit' ).on('click', ...);
    $( 'input.mailpoet_submit' ).on('click', ...);
    $( document ).on('nfFormSubmitResponse', ...);
    $( document ).on('nfFormReady', ...);
    });

    Everything done here can be easily implemented using plain JavaScript (addEventListener, querySelectorAll, event delegation), without loading the entire jQuery library.

    Since WordPress core no longer relies on jQuery for the front-end, would you consider removing the dependency and switching to vanilla JS? This would reduce unused JS, improve Core Web Vitals, and make the plugin more aligned with the modern WP ecosystem.

    Thank you!

You must be logged in to reply to this topic.