The bonus is payable in 2016 - by 12/31 at the latest. We could consider that part of his 2017 compensation...or not. I agree that fronting the bonus makes the deal more attractive to Herrera - the net present value is more attractive than had those dollars been spread.
Regardless - the Phils have committed $30.5 million to Herrera, for five years. That's $500k more than they paid Ryan Howard for just 2016 (including the 2017 buyout). In other words, it's not enough to create any significant constraint on their overall salary budget, in any of the contract years. If Herrera turns into Steve Jeltz, it's an unproductive sunk cost - but not enough of a sunk cost to create problems. If he continues to produce something like 4 WAR/season, it's a bargain. At the same time, if Herrera manages that money wisely (at all), he's now already financially secure for life. Anything additional - endorsements, follow-on contracts, etc. - is gravy. Good deal for everybody.
Further - quite likely below-market contract in the out-years, for a player who will be relatively young for the term of the contract, with no restrictions on trading him...which means the contract will be easily traded, if the Phils want to do that at some point.
I simply cannot find anything to "not like" about this deal - except perhaps that it's Herrera's name on the contract, instead of mine! 