Site icon Hip-Hop Website Design and Development

Is it possible with a code snippet to display a green dot on top of every avatar on a WordPress site for each user that is online?

I tried with a plugin but this doesn’t show the online status everywhere, only in some places. I want the online status of each user to be visible everywhere there is an avatar, in comments, user profile, BuddyPress member list, and forums.
These are the plugins I tried;

Something like this 11 year old plugin, but it’s not for WordPress unfortunately: https://elgg.org/plugins/410784