I think the word correction system got you, it is Lake Como (not comma). Como has the best connections.
remember that 2 nights in a place is equal to one full day, so what are you doing in Santa Margherita? 1 full day or half day with travel elsewhere?
Do a day trip to 5 Terre from Lucca, rather than packing up and moving from 5 Terre. The fewer moves the better. So, 3 days Lucca (with a day trip or 2, and you can get to Florence from Lucca in about 90 minutes by train), 4 nights, an spend more time in Siena, at least 1 full day and maybe more. There are lots of things to see around there.
You are spending 1/3 for your trip in the south. Is there a reason you are going to Puglia? For the amount of time you have it seems like you have too many destinations in mind unless you have specific reasons. The Amalfi Coast is difficult to negotiate. In your case Salerno looks like the best option.
OK, honestly, too many places and too much moving around to really enjoy Italy. I would bag the south and spend my time in the north. Now if you have seen Tuscany/Umbria/Lombardy ok. Otherwise I think you are short changing yourself. Take the six days you have in the south and spend them in Tuscany/Umbria, with at least 2 more nights in Rome, and certainly be in Rome the night before you depart from there. It is just easier.
Now if you don't like that and have to go south, then drop some things up north, like Portofino (unless you like to look at gazillionaire's yachts) and add the time to the south. 20 days are nice but you will be absolutely surprised at how fast they go by.
Efficient transport. For you, rent a car and drive. Do not drive in the cities and do not drive to 5 Terre or the Amalfi Coast, otherwise it is the best way to get between the points you mention. Salerno to Siena, take a train to Rome and change to Siena. or vice versa. That would be most rapid.
Man, I wished I had 20 days to spend in Italy again. And why not Venice this trip?