IP Geo Block is a free plugin you can find at ipgeoblock.com.
You may have noticed your analytics can get muddied with data from areas you don’t serve. If you’re a plumber, restaurant, or bank, etc., you really don’t need all of the data about people visiting your website from Japan, Switzerland, South Africa, New Zealand, etc. It can actually make your website safer to block anyone with an IP address from outside of your selected country from accessing the website.
With IP Geo Block, you can block those IP addresses wholesale, reducing server load, increasing security, and cleaning up your analytics. This reduces the chance of malicious access of your website, and blocks unnecessary comments. If you need to, you can unblock additional countries. For instance, if you’re in the U.S., you could include Canada or Mexico as safe countries to access your website from.