Eek - I'll refrain from making comments about their previous keeper
, but so glad for them that they have ended-up with you
Don't adjust mum's diet too quickly - just build her up gradually. Don't know what breed she is, but I would put her on Sow & Weaner & get some wormer into her in a week or so. Don't do anything too quickly or you'll upset her system. Slowly introduce some fruit & veg, not so much bread - she'll need nutrients more than carbs at the moment.
As for the piglets - their failure to thrive may be passed-over worms or more likely iron deficiency (especially if they were born indoors). It's probably too late to jag them with iron now (should have been done in the 1st week), tho it may be worth trying if you've got some around anyway. Get them on to creep feeding asap - takes the stress of mum a bit. They can be wormed at 6 weeks, if parasites are an issue, but better left until they are 8 weeks-old (some of mum's wormer will go thro the milk).
If you can, get them all under a heat lamp it will help - they can put less energy into keeping warm & make sure the piglets can get to drinking water - so they don't rely on just mum for liquids.
Bless - I hope you can get them through