It REALLY depends on the genre. And the way in which the song is going to be used.
Pick your favorite five or ten songs from any genre. Sit down and analyze them - do notes tend to change by steps, or leaps? do they follow the chords, or go outside? Is the range wide, or narrow?
I write church music for that most non-singing bunch of churchgoers - Roman Catholics. I know my range better not be more than a 9th or a 10th, and the more I spend below a D or above a B, the fewer people will be singing. Probably about a 10% loss for each note outside the range. My motion needs to be stepwise, though an occasional 3rd or 5th is okay. I need to be diatonic***, and repeat ideas a lot, so they're not trying to sing 6 or 8 completely different musical phrases. And SOMEHOW, I have to keep it musical, and interesting, though there's a lot of published music for congregations that is neither.
OTOH, if I were writing a bebop melody, or a fusion melody, or a post-classical period symphonic melody, I would be breaking all these rules.
For my birthday (2 days ago), my wife bought me a couple of CDs with Hebrew folk melodies, and a book of 150 British Isles songs, with melodies and lyrics. Irish melodies in particular are great fo getting people to sing along. After a summer of burying my assembly in Irish melodies, our old Irish pastor, now retired, told them, "you're singing like a buncha Protestants. That's a good thing."
I didn't have the heart to tell him Protestants sing in 4-part harmony - I just had 'em singing in unison. But he was right about the level of participation...
Daf
*** - by the way - my only published piece, "Joy!" (GIA Publications, the Leavensong series), breaks all these rules...