It looks to me like the subfloor is in bad shape where the toilet had been leaking. The flange must be screwed down solidly to the subfloor. If the subfloor is solid enough to hold screws well, I would install a spacer under the flange to make up for the thickness of the missing tile (flange should be on top the tile) and see if it will screw down flat.
If it is 4" pipe, you are ok with the inside fitting flange. It it is 3" pipe, I would only use an outside fitting flange. The flange needs to be properly cemented into or onto the ABS closet elbow.
It's been said that most plumbers avoid the plastic flanges because they tend to break.
The better flanges have a stainless steel ring.