I respectfully disagree. The employer has the OPTION to deduct a contribution deposited in 2018 and ALLOCATED for 2017, as a 2017 deduction (if made within the allowable timeframe) but may choose to deduct it in 2018 if so desired.
Although this may not be supported by a strict reading of the statutory language, the IRS interprets it as optional, at least unofficially. I've seen plans get audited where this wasn't even questioned.
The following from the IRS should prove helpful. Seems pretty clearly stated.
https://www.irs.gov/pub/irs-tege/epche903.pdf