The closest law that I can find to banning Somalians from New Zealand is United Nations Sanctions (Somalia) Regulations 2018, which only applies to designated people on a UN list.
No Somali passport is allowed to be endorsed however, which mean you have to get a Certificate of Identity to travel to New Zealand.
Further to the answer for New Zealand, the article also appears to be incorrect regarding Australia. The Australian government’s visa options website also allows selection of Somalia as country of passport, and presents visa options for tourism or business travel.
The Wikipedia article conflicts with information available directly from the New Zealand government.
Following the links on the NZ government visa page here allows one to enter “Somalia” for country of passport, and returns a screen showing that a Visitor Visa is available and requires these things:
You must show that you’re a genuine tourist or visitor and intend to leave New Zealand at the end of your stay.
You must have enough money to live on while you’re in New Zealand or have an acceptable sponsor.
You must have a ticket to leave New Zealand or be sponsored for the cost of your onward travel.
Credit:stackoverflow.com‘