Vanilla 1 trying to lose some weight: can I exclude some extension's js from visitors pages?

I'm trying to reduce page load on a Vanilla 1 site.
In that process, I thought I could prevent some unnecessary files from being sent to visitors (not members).
For example, visitors will never need notifi's javascript.
Is it safe to add
I've tested it and I think it works but, I may miss some repercussions unknown to a non coder as myself.
Any input is appreciated.
In that process, I thought I could prevent some unnecessary files from being sent to visitors (not members).
For example, visitors will never need notifi's javascript.
Is it safe to add
&& $Context->Session->UserID > 0
when calling js files in the extension's default.php file?I've tested it and I think it works but, I may miss some repercussions unknown to a non coder as myself.
Any input is appreciated.

0
Comments
Some days went by and still no problems...
Saved almost 300KB!