A way to check if wordpress installation is self-hosted or hosted via wordpress.com?

I'm developing this plugin that needs a way to check the status of the Wordpress installation What is the most reliable way to determine that?

Any $_SERVER variables or anything that could differentiate between the two?

Topic hosting Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.