No, Allen has not fielded a better defense than Purdue the last two years, at least when you look at Big Ten only stats/games. Your statement is only valid when you include iu's ridiculously easy non-conference schedules.
For the 2017 season: Scoring defense/game - P 19.2/game, iu 30.0/game; total D - P 369.8 yds/game, iu 362.0 yds/game; RushD - P 134.6 yds/game, iu 166.0 yds/game ; Pass D - P 235.2 yds/game, iu 196.0 yds/game; TO margin - P 0(even), iu - negative 6.
For the 2018 season: Scoring D/game - P 28.2/game, iu 33.9/ game; Total D - P 449.4 yds/game, iu 457.4 yds/game; Rush D - P 176.4 yds/game, iu 181.8 yds/game ; Pass D - P 273.0 yds/game, iu 275.7 yds/game; TO margin - P negative 4, iu + 3.
Yes, the iu defense has improved versus that of the early Wilson years but it still ranks near the bottom of the conference in nearly all categories in conference play. Only including the very weak non conference games makes that defense appear to be "top 25". Only 2 games against P5 conference teams in the past 2 years? And none this year, or the next, or the next? Come on.