Could he make religion the test for entry?
Yes.
8 USC §1182: Whenever the President finds that the entry of any aliens or of any class of aliens into the United States would be detrimental to the interests of the United States, he may by proclamation, and for such period as he shall deem necessary, suspend the entry of all aliens or any class of aliens as immigrants or nonimmigrants, or impose on the entry of aliens any restrictions he may deem to be appropriate (emphasis added).
It may be unpopular or it may not be.
The courts have recognized his and congress’s plenary powers here.
Yes non citizens are not covered by the Constitution.
Eugene Volokh has a commentary on it if you’re interested:
https://www.washingtonpost.com/news/volokh-conspiracy/wp/2015/12/08/banning-muslims-from-entering-the-u-s-is-a-very-bad-idea-but-it-may-be-constitutionally-permissible/