If you're going melee, I suggest getting a Chlorophyte Claymore (the spear), besides shooting a poisonous cloud, it's also pretty long to evade touch damage from Plantera, risky though as you have to stay in close touch with Plantera, you can also use the mushroom spear if you want, if you use it perfectly, it can do more damage than Chlorophyte Claymore, if it haven't already, forgot the damage.
Oh, you can also use True Night's Edge or True Excalibur, or even Terra Blade, if you encounter any solar eclipses.
The weakness is the thorn balls and projectiles. You need to be moving almost all the time to dodge them.
If you're going ranged, then I suggest Chlorophyte Repeater, or the Tsunami, if you have beaten Duke Fishron, use Chlorophyte arrows, so you can focus more in dodging, alternatively, you can use ichor arrows, to weaken Plantera.
Alternatively, you can use a Megashark with Chlorophyte bullets.
The weakness is that you will need to grind for the materials, easy to do though.
If you are a magic user, I suggest using Golden Shower to deal Ichor (if you have Crimson in your world), Demon Scythes, if you can aim them properly. I'm not good at mage character so, meh.
If you're going summoner, then good luck, I suggest Optic Staff, which will spawn 4 Retinazers and 4 Spazmatisms if you're going to use spider set.
Regardless, I wish you good luck, Plantera is one hell of a crazy plant
(use a long platform)