Best phone: HTC One M7. It's simply a winner (not to mention pretty). More than three years old now and still runs like a champ. For the $230 out of pocket I spent on it (because of some extremely fortunate trade-in deals I got), everything else I have ever owned is just no contest for it.
Best tablet: Samsung Galaxy Note Pro. Beautiful, large screen. Fantastic battery. Not much else to say.
Honorable mention: HP Touchpad. Still getting Android ports even now up to Marshmallow. Standing proud next to my couch on its Touchstone charging stand. Spent only $120 for it, almost five years ago. Damn.
It's really hard to decide on the worst, as I've never actually regretted a phone/tablet purchase and/or think any of them are 'bad'.
For tablets, maybe the two atom-based Windows tablets (7 and 8 inches) that I bought last year. They're not bad, but they ended up getting used very sparingly because their functionality has been covered by other devices. They also came pretty cheap (maybe $125 out of pocket total) and each of them came with a year of Office 365 subscription. Not exactly a loss. I would sell them but not sure if anyone would pay money for them now that people could get dozens of different types of Chromebooks and Windows 2-in-1s with not much more money, with more power and similar functionality.
For phones, I probably have to go way back to the Motorola V635 back in 2004. It was supposed to be great phone, but it lasts less than two weeks in my possession until I sold it. Again, not necessarily because the device was bad, but after ~9 years of carrying a candybar phone I decided back then to test a flip and found out that I absolutely hated that form factor. So I went back to Nokia. Of course.