PORT ST. LUCIE — Michael Cuddyer’s retirement saved the Mets a bundle, but not the total remaining value of his contract.

According to an industry source, Cuddyer received a buyout valued in the $2 million to $3 million range to terminate his contract with the Mets in December. The veteran outfielder was due $12.5 million in the final season of a backloaded two-year deal, and the buyout was added to even out the contract. Cuddyer earned $8.5 million during a disappointing 2015 season in which he was plagued by injuries and inconsistency at the plate.

The 36-year-old Cuddyer’s retirement created payroll flexibility for the Mets, but general manager Sandy Alderson said Tuesday the club still would have been in position to pursue Yoenis Cespedes had Cuddyer remained on the team. But Alderson acknowledged there were other offseason moves the Mets might not have completed.

On Jan. 22 — more than a month after Cuddyer retired — Cespedes agreed to a three-year deal worth $75 million, which contains an opt-out after this season. Cespedes will earn $27.5 million this season. Antonio Bastardo, Asdrubal Cabrera, Alejandro De Aza, Jerry Blevins and Bartolo Colon were the Mets’ other free-agent signings this winter.

As it stands, the Mets’ payroll has surged past $140 million — its highest level since Alderson’s first season, 2011.

Curtis Granderson said he is unsure if he has pinkeye, but the outfielder planned to work out — wearing glasses in place of his contact lenses. Granderson was sent to the doctor Monday because of irritation in his right eye.

“I’ll do as much as I can with my glasses on,” Granderson said.

Lefty reliever Josh Smoker was among the standouts in the Mets’ intrasquad scrimmages, pitching two perfect innings with one strikeout.

“He’s got a real good arm,” manager Terry Collins said. “I was real happy to see him pound the strike zone like that. He threw a couple of good breaking balls, so it will be fun to see how he goes into camp.”

Wilmer Flores was sick and did not participate in the scrimmage.