Good question. Surely not everyone who went through Ellis Island was a model citizen, but at least requiring them to go through a process would weed out a portion of the bad eggs.
I think there should be a list of "high risk" countries (e.g. Saudi Arabia, for one) based on past immigration experiences in the US and other western countries based on assimilation rates/crime stats/social factors/welfare use/other qualities.
You could set up a computer program to evaluate risk. Immigrants from countries that have PROVEN to be good and productive citizens overall would have preference. Those from "high risk" countries would have to go through a much more intensive process, and would have much lower immigration rates overall.