When replacing wheels what else besides checking tire size & lug pattern is necessary?

I need new tires.
My friend has some brand new ones that she will give me but there is a slight difference in size.
Right now I have P215/60R16 and she has P225/60R17.
I was told that as long as the lug pattern matches exactly they will work.
I am wondering if that is the case before I change them.
Thank you.

It sounds like you are changing not only tires, but also wheels!
You should be certain that the offset of the replacement wheels is within front and rear specifications for your car.
If not within those specs, it is possible that the replacement tires will rub inside the fender and / or bump up against steering components.
Also, verify that the profile of the replacement tires will not be such that they lower the car causing it to hit road obstacles and angled driveways.