What I see is that the i5 should plug right in, but it uses about 30W more of power, be aware of that. That computer came with different levels of power supply, hopefully you have the higher level.
As to performance, this issue is more complicated. Different games have different requirements. A game like City Skylines, which is very CPU intensive, will perform much better with this upgrade. A game like Rise of the Tomb Raider, which is very GPU intensive, will see no practical benefits from this upgrade. So, as always, it depends on which games you play.