• Resolved stkuhn

    (@stkuhn)


    Hi,
    Perfecty Push Notifications is a really nice solution that almost works out of the box. But I have 2 questions:

    1. Why do you directly execute php-code from the plugin-folder? Many webmasters deny php-execution from plugin-folders cause of security issues …

    2. I manage a website with no jquery in the frontend. When I activate Perfecty Push the pagespeed insights drop massivly even if there are no notifications to send. The main reason for that speed-drop is 76 kb more jacascript-code (jquery.min.js, wp-polyfill.min.js, hooks.min.js, i18n.min.js etc.). Is there a way to use Perfecty Push without jquery or do you plan a vanilla javascript solution?

    Greets Stefan

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Rowinson Gallego

    (@rwngallego)

    Hi @stkuhn, and thank you for your comment.

    Why do you directly execute php-code from the plugin-folder

    Sorry, could you please clarify this? I don’t see where we are doing these executions? Do you mean the wp-cron execution? If there’s something we are not doing it right, sure, we can fix it, specially for security concerns.

    Is there a way to use Perfecty Push without jquery or do you plan a vanilla javascript solution?

    Of course, we’ve done the biggest part to achieve this in our last release. There are some small scripts where we use jquery in the admin part, so for sure we will take a look at this. For the moment, I’ve created a ticket: https://github.com/rwngallego/perfecty-push-wp/issues/32

    Thread Starter stkuhn

    (@stkuhn)

    Thanks for your quick answer!

    1. It’s the Service-Worker-Loader which is loaded directly from the plugin-folder (/wp-content/plugins/perfecty-push-notifications/public/js/service-worker-loader.js.php) and I really dont know why …

    2. In admin part jquery would be no problem cause performance doesnt matter here. But jquery is still needed on the frontend. The script “js/perfecty-push-sdk/dist/perfecty-push-sdk.min.js” requires jquery. Could this be fixed?

    Greets Stefan

    Plugin Author Rowinson Gallego

    (@rwngallego)

    It’s the Service-Worker-Loader which is loaded directly from the plugin-folder (/wp-content/plugins/perfecty-push-notifications/public/js/service-worker-loader.js.php) and I really dont know why

    Oh, I see, this is only for adding the Service-Worker-Allowed: / header, which is important to register the JS Service Worker in any scope chosen by the user (This is also done by OneSignal and other Push providers), and shouldn’t represent any major security concern.

    In admin part jquery would be no problem cause performance doesnt matter here. But jquery is still needed on the frontend. The script “js/perfecty-push-sdk/dist/perfecty-push-sdk.min.js” requires jquery. Could this be fixed?

    Yes, we’ve noticed this is only for the public facing. Sure, we’re already addressing this in the github ticket and will be included in the next release. Thanks for reporting this!

    Thread Starter stkuhn

    (@stkuhn)

    Sounds great,
    cause I dont want to mess up the great pagespeed / lighthouse values…
    Greets Stefan

    Plugin Author Rowinson Gallego

    (@rwngallego)

    This has been released on v1.1.2

    Thread Starter stkuhn

    (@stkuhn)

    Theanks,

    great job! Compressed pagesize-increase is now only 10KB and performance-drop is absolutely acceptable!

    Greets Stefan

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Jquery usage in Perfecty Push Notifications’ is closed to new replies.