This is only somewhat less ineffective than a blanket ban: instead of targeting criminals and radicals, you're proposing a thoughtcriminal regulation that I doubt plenty of non-Muslims (including myself) will manage to pass if enforced to them. While it's reasonable to think that a nation would rationally seek to proselytize its common values and homogenize the populace's thinking, there are also plenty other considerations that would render such laws excessive and inefficient. Spreading your net wider than necessary is counter-productive.