SANTA CLARA, Calif. (AP) The San Francisco 49ers' offense ranks last in both scoring and yardage.

Those struggles, in part, can be traced back to the 49ers performance on third down.

Over the past two games, the 49ers converted just 4 of 27 attempts in lopsided losses to Cleveland and Cincinnati.

Quarterback Blaine Gabbert, who will make his seventh start in Detroit on Sunday since taking over for Colin Kaepernick, said the struggles on third down are a result of what happens on earlier downs.

''We were in third-and-12, third-and-15, and the percentages of converting those are low, especially when you're taking penalties on second down to put yourself in third-and-15. It was just more of us shooting ourselves in the foot than anything,'' Gabbert said.

Six of the 49ers' 11 penalties in the 24-14 loss Sunday to the Bengals came on offense, including two in the first quarter that set up third-and-long situations.

Gabbert was sacked four times Sunday, after taking a franchise- worst tying nine sacks the previous week in the loss to the Browns.

''Blaine Gabbert has got to be able to be protected too. He's got to have time to make those throws,'' coach Jim Tomsula said Sunday, when asked about his team's 2-for-14 performance on third down.

Gabbert said the long-yardage situations are difficult to convert.

''They know what we're trying to do on third-and-15. We're trying to get to the (first-down) sticks, so that's the coverage that they're going to play,'' Gabbert said. ''They're going to drop everybody right there at the marker and make you throw underneath so they can rally and make a tackle.''

For the season, the 49ers rank 30th in the league, converting 30 percent of their third downs. Since Gabbert became the starter Week 9, the offense has converted just 25 percent. The 49ers are 2-4 with Gabbert under center.

One of Gabbert's favorite third-down options is running back Shaun Draughn, who entered the starting lineup the same day Gabbert replaced Kaepernick against the Falcons on Nov. 8. Draughn is Gabbert's second-most targeted option behind receiver Anquan Boldin.

Draughn suffered a knee injury in the first half of Sunday's game and did not return. He had an MRI at Stanford University Medical Center. The 49ers added running back DuJuan Harris from the Ravens practice squad Tuesday, waiving Travaris Cadet to make room on the roster.

Draughn's status for Sunday's game against the Lions is unknown. He's been an unlikely source of production after San Francisco lost its top three running backs to start the season to injuries: Carlos Hyde (foot), Reggie Bush (knee) and Mike Davis (hand).

Draughn has 263 yards rushing and 175 receiving as the starting running back over the past six games.

Davis returned to practice this week after being placed on short-term injured reserve following surgery, but he is not eligible to play until the season finale against the Rams on Jan. 3.