The 2013 Buffalo Bills defense improved over the 2012 season in every single statistical category kept by the NFL.

It’s the one category in which the Bills made the least improvement, however, that left a bad taste in the mouths of coaches, players and fans.

The Bills were 31st against the run in 2012 and moved up only to 28th in 2013.

“That pains me, I’m not going to lie,” admitted Bills defensive line coach Anthony Weaver the week before the end of the season. “The thing that gets me is a lot of the time it’s gash plays. It’s not like they’re milking us for 5 yards at a time and working their way down the field. … To me it’s the 20-yarders, the 30-yarders, those are the things that are killing us.”

The Bills allowed 19 runs of 20 or more yards, the most in the NFL. It was a collective effort.

Some examples: Safety Jim Leonhard whiffed on a tackle at the line of scrimmage on a 27-yard TD run against Atlanta. In the season finale in New England, Kyle Williams spun himself out of position on two plays and cut-back runners burst through his gap. Mario Williams allowed himself to get outmuscled by tight end Michael Hoomanawanui on the clinching, 35-yard TD run in New England. Corbin Bryant couldn’t get off a block and Manny Lawson missed a tackle in the hole on a 29-yard run by the Pats. Kiko Alonso and Aaron Williams way overran the play on a 38-yard TD run against Atlanta. Stephon Gilmore and Jairus Byrd had a mix-up on who had post responsibility on Bobby Rainey’s 80-yard TD run in Tampa.

“A year from now, having made that mistake and having been in the defense for another year, we hope we wouldn’t make that mistake again,” Weaver said of the Rainey TD run that set the tone for the Tampa loss. “I’ve played that defensive call a million times. To give up an 80-yard run, that’s unheard of on that particular play.”

“Obviously we’re disappointed in it and we have to improve on it,” said coach Doug Marrone. “What’s frustrating is you go in there and some games you perform very well in an aspect of whether it’s run defense or sacking the quarterback or pass defense or interceptions. And then some games you don’t.”

The Bills could use another linebacker. Neither Nigel Bradham nor Arthur Moats distinguished himself in alternating at the inside spot next to Alonso.

Aside from that, the Bills’ personnel should have been better against the run.

They think another year of experience in the system will eliminate some breakdowns.

“We’ve still got a lot to learn about the defense and the possibilities of it,” said Mario Williams. “I think we’ll definitely be able to fix some things.”

The illusion of pressure

Overall, the Bills defense improved from 22nd in yards allowed and 26th in points allowed in 2012 to 10th in yards and 20th in points in 2013. The defense didn’t get enough help from the offense, which ranked 22nd in points and operated in hurry-up mode a lot. Buffalo’s defense faced 68 plays a game, tied for seventh most in the league.

Buffalo’s 57 sacks ranked second in the NFL to Carolina (60). Coordinator Mike Pettine was able to create pressure without gambling too much. Only 23 of the sacks (40 percent) came when the Bills rushed five or more men, according to News analysis.

The Bills “blitzed,” meaning they rushed five or more, on 27 percent of opponents’ pass plays, according to The News’ totals. That was a big increase on last year, when Buffalo blitzed a ridiculously low 15 percent. But Buffalo’s rate of rushing five or more still ranked only 31st this year, according to ProFootballFocus.com.

Pettine had the horses, with his defensive linemen, to get to the quarterback with four rushers. But he helped the D-line a lot by creating “the illusion of pressure,” constantly varying which four defenders rushed and threatening to come with seven or eight at the line of scrimmage.

Buffalo rushed defensive backs on 17.4 percent of pass plays. But more than a third of those plays, the DB was simply joining a four-man rush, not a blitz. The Bills were effective with defensive back rushes on third downs. Buffalo had 13 sacks on 67 third-down plays when a DB rushed, and opponents converted only 23 percent of third downs in those situations.

Unit grades

Defensive line:

Mario Williams, Jerry Hughes, Kyle Williams and Marcell Dareus combined for 41 sacks. Opposing scouts rated Dareus the most valuable of the four. He dominated Miami center Mike Pouncey in the second last game. Too bad his season ended on a sour note with a half-game benching. Mario Williams had 13.5 sacks and won the Bills two games (Carolina and at Miami). He actually played 60 percent of his snaps on the left side of the defense and 40 percent on the right side, which allowed Hughes to get quality pass-rush opportunities on the blind side of the QB. Mario Williams had stretches in the second half of the season in which he wasn’t winning many one-on-one battles (against Pittsburgh, Tampa Bay and New England). The bar is high for him, but the Bills could have used some more tackles from him.

Linebacker:

Alonso was hell on wheels the first six games and did not miss a snap all season. He was awesome against backs in coverage. He overran too many run plays. The future is bright for him. Bradham and Moats combined to play 50 percent of the snaps but didn’t make many plays. Manny Lawson was better in coverage than expected and average against the run.

Secondary:

The Bills sorely missed Stephon Gilmore, who sat out the first six games and didn’t start looking like himself until the last six weeks. Leodis McKelvin revived his career with a solid season, and Nickell Robey was a revelation in the slot. Once Jairus Byrd got healthy, he and Aaron Williams formed a fine safety tandem. The Bills were second in the NFL in interceptions, with 23. Leonhard made good plays at times, but he was a liability as a tackler. Da’Norris Searcy was an upgrade over Bryan Scott as an in-the-box safety.

Coaching: ŒŒŒŒŒ

Pettine’s approach was more creative than the Bills have seen in a long time.

Third-down oddity

The Bills ranked 14th on third downs, holding foes to 37 percent conversions. That was another big upgrade over 2012, when they ranked 31st. Buffalo led the NFL in third and 4 to 7, holding foes to 28.2 percent conversions. But it was sixth worst on third-and-8 or more, allowing 28 percent conversions. That was a head-scratcher.