Handguns and long guns both have a potential place in home defense, and *I* am reading this thread as specifically discussing long gun selection , so I'm not discussing handguns.
*I* also interpeded this thread as specifically IF an AR-15 could have viable usage, so I won't go too far into what is the "Best-est" .
(Presuming 5.56 cal , and (the prudent) usage of M193 type 55gr ammo ( or lesser ). A whole bunch of testing shows that M193 penetrates LESS * in common interior wall construction * than most common SD/ Duty handgun ammo. And I have never seen any publish ( or leaked from credible sources ) testing showing the reverse. Yes , it's counter intuitive , and flys in the face of a couple decades of common assumptions, but it is what it is. So no reason too avoid an AR on that count.
We can argue till the cows come how about how many angels can dance on each pellet of buckshot , but M193 will have close range stopping power at least as much as typical handgun, so no reason to avoid an AR on that count.
An AR of 16-18in configuration ( give or take length of flash hider ) is similar or shorter than common SD/ Duty shotguns, so no reason to avoid an AR on that count.
Admittedly , the main advantages of an AR from Millitary or LE viewpoint ( long-ish range , high capacity will *usually* not be required in Home Defense , but having capabilities not called into play doesn't detract anything either.
Biggfoot's Bottom Line = If you LIKE an AR-15 , shoot it particularily well , or it's your only suitable long gun , by all means use one.
[ It's not my personal first choice, nor my default recomendation to newbies, but I won't often try to talk anyone out of one. I'm me , you're you , YMMV. ]