An Alternative to Cracking down on Visas
Instead of simply keeping people from terrorist-ridden nations out of the country, maybe we should apply the pack-not-a-herd principle and use an analog of Megan's Law. Instead of leaving the decision to let would-be Americans (or would-be saboteurs) into the country in the hands of overworked bureaucrats, we can distribute the information and let their neighbors, their flight instructors, and the neighbors of their flight instructors keep track of suspicious activities.
One potential problem is that the immigrants might cluster in a neighborhood that's 90% from X-land. (This is the situation in Israel. The Palestinians are concentrated which means they have no Israeli neighbors to snoop on them.) That will lead to a shortage of neighbors that can keep track of them. It might be necessary to invert the usual zoning laws and disperse potentially undesirable minorities.