The flag is very similar to the flag of Syria and Iraq, which had similar Arab nationalist regimes. In fact, for a time, the three countries had flags with one, two and three stars respectively!

North Yemen:

Syria:

Iraq:

Before the coup, North Yemen was a monarchy, and its flag also looked much like what you could expect from a Muslim monarchy. Compare with Saudi Arabia for example.