what's wrong with a value raise?

he only paid him $5 more when the flush hit.

he's paying $7 to win $22. Clearly not getting the odds for the turn (20%). Taking implied odds into account, if we assume you're only paying him another $5 if the flush hits on the turn, you're making still money, but only just.

That said, I have made some calculations and I realized I made a mistake in evaluating the size of the pot. Pot is 5.75 preflop, villain bets 5. When you call you will make the pot 15.75 - therefore, to make a proper value raise I would raise by $10. Make villain pay 2:5 for 1:5 odds

But there's a catch 22. Assuming villain calls, he's now got $17.50 in the pot and his stack is only $29.50, so he only got $12 left. Assuming turn comes a rag, you can only push for $12, and the pot is by then $47.75, and villain has odds to call (but is not gaining anything from calling)

So, with villain's stack, a $10 raise would earn you extra money, but not by much because you become pot committed to calling if the flush hits on the turn, and you can't push him out on the turn. You increase your variance playing this way.

So my line assuming villain had another $20 in his stack would be to raise the flop to $15, push the turn on a rag and check/call/fold/push a scare card turn depending on read and size of bet.

With villain's stack size, I agree with pushing and taking it down.