You are quite selective as to what you want to claim as "terrorist attacks".
From the list Jordan by far has accepted the most refugees. This is a Muslim Country,
No terrorist attacks have been attributed to those refugees since 2005 . Those 2005 attacks were committed by Al Qaeda in Iraq , a group which had no presence prior to the US led invasion of that country.
The single largest terrorist attack carried out in the region was by the United States of America and allies in "Shock and awe". Shock and awe was claimed by the US Government to be using firepower in such an overwhelming manner and to such effect that the Iraqi people would lose any stomach for a fight against the US led invasion. This is the very definition of terrorism.
This US sponsored invasion was premised on lies, that being that Saddam supported Al Qaeda, which was an absolute crock, and that he had weapons of mass destruction, another deliberate lie and qualifies as a war crime.
The best way these countries can prevent terrorism is to keep the USA out of the region as it that SAME USA that supported Al Qaeda in Libya and supports terrorist groups in Syria.