Hi "mbirame". Welcome!
I have passive 5" nearfield speakers that are front ported so supposedly that makes them ok to be so close to the walls...
Not really: It makes them easier to soffit-mount, but doesn't much affect placing them close to walls or not: you'll get comb filtering, reflections and other artifacts from
any speaker placed close to a wall, regardless of how good it is, if it is ported or not, and where the ports are: The problem is not the speaker: the problem is the wall. You show yours right up against the wall, which is good as those issues will be limited mostly to mid-highs and highs, plus you get a mild bass boost from the wall. As you move them away form the wall, all of those problems move to lower frequencies. There's a region where those artifacts become very objectionable, as they are right in the middle of the spectrum. But as you move the speakers further away, beyond about 2m or so, they fall to such low frequencies as to not be a problem any more. So either right against the wall or far from it is the best.
What got me here is I'm starting to work more with electronic music where I'm needing to better hear the bass, and I was thinking I need a sub and a friend suggested first looking into treating my room.
You are right. So is your friend!

5" speakers are not producing much bass to start with (even though putting them against the walls helps to extend the bass a bit), and no matter how much you treat the room, that won't make your speakers produce more bass! So if you want bass in your room, you have to put it there. What speakers are you using? Make and model.
Soffit-mounting (or "flush-mounting") your speakers will help to increase your bass response a bit, but you don't have the budget for that, and your speakers are already against the wall, so the gain would only be a couple of dB.
But your friend is also right: Your room is small, so it needs LOTS of bass trapping. That will even out the modal response of the room, which could be causing problems right now that you aren't even aware of, and will only notice when you take your mixes and play them somewhere else; then you notice the problems.
So you need both: Get a good sub-woofer that covers the frequency range you need, and also a good crossover to go with it, and also install lots of bass trapping in the usual places. Yes, you could use the closet as a bass trap: take the doors off, empty it out, and stuff it full of mineral wool. Good start!
Apart from that, you also need treatment on your first reflection points in the room, a cloud on the ceiling, and absorption on the rear wall.
The problem here is your budget: a good sub is going to cost you 3 or 4 times your initial budget, a cross over will be about the same as your budget, and the treatment can be started for your budget, but will end up costing many times that by the time you are done. So that brings a paradox: Treating with bass traps now won't help much, since you don't have much bass in the room, so you won't notice a huge change. Buying a good sub and crossover certainly WILL put plenty of bass in the room, but that will excite modes that just aren't even there at present, upsetting the room response even more! To fix that, you need the treatment.
So which do you do first? Treating, which will help a bit but not hugely until you get the sub? Or get the sub, which will create huge issues that you can't solve until you treat?
- Stuart -