Actually, Pats are #1 defense (points AND yards).
As for SF, I will give them credit for being 5-0. They beat the teams they were supposed to. But a closer look at their opponents records. Not one team on their schedule that's now above .500. Rams were the best team they faced (Rams are 3-3). But the rest of their schedule is a bunch of 2-4 teams (Cleveland, TB, and Pittsburgh) and 0-6 Cincinnati.
Defense is a lot easier when you're offense is putting up big numbers, which is the case with both SF and NE.