What about using the term 'sh*thole countries?'
I suspect that we all used such language when were were young and impulsive. I suspect that most of us outgrew this and do not use such language in public. The President is 'supposed' to be an example for all of us (it would be interesting to know whether anyone disagrees with that). Such language as this and much of what the President says in Tweets is not only unbecoming but can be dangerous as well.
Although certainly not a good thing to say, I don't consider that racist either. It was a very rude critique of other countries that, I admit, is below the office of the presidency.
Most countries, other then the USA, Canada, and a few others, are partly based upon an overall majority ethnicity. Germany is made up of Germans, Japan is made up of Japanese, etc. If we were to consider this critique racist just because it was directed towards a country with an overall ethnic majority that the person critiquing does not share, then any critique of any country by anyone who does not share that country's ethnicity would also have to be racist by this argument. This is of course non-sense.
Now, as I noted before, I don't feel this was an appropriate way to critique these countries by the president and I do not condone it. It was certainly rude and makes foreign interactions more difficult.