Thank you Kai for your nice plugin like on-site-notifications . But here are few thing what I feel about this plugin. ( I am sorry if I am being bit straight forward, It is just an complement towards improvement, Don't take it in a negative way . I am mentioning here just to inform @Scott about my findings ) .
Hello Scott , The on-site-notifications plugin works well but can not be used with q2a core. Here are the reasons
1. this plugin creates a duplicate event with the event logger plugin , which will have duplicate data in the same table, with a different event name . Not sure why this is required .
https://github.com/q2apro/q2apro-on-site-notifications/blob/master/q2apro-history-check.php#L94
For comments the insert query runs as many times it has a unique user , this can be improved like - INSERT INTO TABLE TBL_NM VALUES (1,2,3), (4,5,6)
https://github.com/q2apro/q2apro-on-site-notifications/blob/master/q2apro-history-check.php#L174
2. Quering the event log wont be a good idea , as this is generally a huge table . Rather we can have two identical tables and keep moving the read and unused notification events to the secondary table , can help in improving the load time of the ajax calls .
3. Notifies only when the button is clicked , and needs a page load to refresh the count of notifications . You can do this by doing an ajax call on a ajax call with a time interval (every 5 mins).
4. This handles the view part itself , rather it should return a json response and the view should be created from the theme layer. SO that it can be themable.
I saw some performance drop with this plugin while I was working with one website who has a huge database and more than 50K records in the event log table. The queries were running slow .
I am putting what I realized after my review and please correct me if I am wrong somewhere .