Hard facts: OP probably has 8 good days to utilize. Getting to and from their destination(s) is going to (or should, IMHO) influence the itinerary, because of the short time available and potential time lost to travel. Efficient flight options may be limited (maybe very limited).
(The above assumes they are coming from North America. If based in Europe, they get an extra usable day, maybe two. If coming from the UK, they have even more options, maybe more time. If coming from somewhere much further away, then less.)
There are some direct flights from North America to mainland Portugal (American Airlines, TAP, maybe one or two others), but Portugal is not as well-connected to North America as much of the continent. Though their network is somewhat limited, if the OP lives in a city served by TAP ("TAP Air Portugal"), that would help reduce flight times. But if they need to (or choose to) fly via a stop elsewhere in Europe, that will eat a little more time.
There are direct flights to Madeira from multiple European cities, lots from Portugal (also a surprising number from the UK), and some other places. Reducing the flying will help, but they still have limited time and (I'm assuming) a long way to go.
I suggest they pick either Madeira or mainland Portugal, but as suggested above by acraven, they could combine Madeira with a short stop in just Lisbon/nearby (because, there's a pretty good chance they will have to go through Lisbon anyway, going to/returning from Madeira). I still think the ratio of "time being there" to "time in transit" isn't favorable, but it's the OP's trip.
One little-known option that could help reduce the flights, is an airline called "SATA Azores Airlines". SATA has direct flights from a few North American cities (Boston, Montreal, Oakland, maybe one or two more) to Ponta Delgada (PDL) in the Azores (Ponta Delgada is SATA's "hub"). From there, they have direct flights to Madeira. That is (by far) the shortest route to Madeira from North America, but it depends on where you start from (also, these flights are not every day). But if everything aligns nicely (OP lives near a city SATA serves, the SATA flight to PDL goes on the "right" day, they can connect efficiently to Madeira from PDL, then they catch a direct flight from Madeira to Lisbon for the return...) it could work out nicely. This is a bit of a longshot (multiple things have to all line up) but if they do, it might work well. It's exactly the kind of transportation "adventure" I love (I enjoy creative and obscure solutions to flight challenges), but I'm sure it makes others roll their eyes and shake their heads.
I still think "pick one, not both" but it depends on the OP's starting location, and it's worth at least a quick look at SATA just in case all the stars are aligned.