Short version: I'd say skip the Azores/Madeira on this trip, as they deserve MUCH more time than you can give them, and stick to mainland Portugal. You won't run out of good stuff on the mainland with the amount of time you have. Plan another, dedicated trip to these islands when you can give them more time.
Justification: I've been to Portugal 4 times over the past 30 years, and have only scratched the surface, going to the typical places on the mainland where most tourists go. I recall on my first trip there thinking the country appeared surprisingly under-appreciated by international visitors and tourists numbers seemed surprisingly low to me (that clearly has changed in recent years). I know there's a lot more to mainland Portugal that I have not yet seen and I look forward to going back.
We spent 3 weeks in the Azores in September on 2021. It was awesome. With 3 weeks, we had a full week on Sao Miguel (the big island); with a week, we didn't get to everything on our list, we would needed at least 10 days there. I think virtually all first-time visitors to the Azores greatly underestimate the time needed to appreciate Sao Miguel. I recall one day having breakfast at our hotel in Ponta Delgada, over-hearing a conversation from the couple at the next table. They were lamenting that they had only planned 3 days in the islands and were wishing they had a week to spend. I see folks planning trips to Portugal with a one-day, maybe two-day, side trip to Sao Miguel. To me that's like flying to the Hawaiian Islands for a day or two. Sure, it's better than never having been there, but having to leave after just a couple days is going to leave anyone pretty disappointed.
And the vast majority of tourists visiting the Azores only go to Sao Miguel. There are 8 other islands, each is unique and has plenty of worthwhile things to see and do. On our 3-week trip, we managed to squeeze in 6 of them, and I was glad to have been able to see at least the highlights of each of them...but even before we left, we were plotting a return trip. We plan to go back to see the others, and re-visit a few of the islands where we needed more time. Getting from island to island has some logistical challenges which work against anyone who is in a hurry (Carl mentions some weather-related ones, there are others).
I have not been to Madeira yet. We are looking forward to that on a future trip. Madeira looks spectacular, too, but it seems a bit better-suited to a short visit: it's slightly smaller than Sao Miguel, but isn't in a group of many other islands (Madeira does have a small, second island, but it's pretty small).
Of course it's your trip and only you can decide how to prioritize your time based on your interests and travel style - all travel planning involves trade-offs. But that said, I think mainland Portugal has plenty of great things to see and do to keep you busy for your 16-ish days. I would stick to the mainland on this trip, and start thinking about when you can manage a dedicated trip to Madeira/Azores next time.