marginal doesn't cover it. Quite aside from the potentially unapproved socket laying on the floor, the plug to the stove, and the supply wire from the wall looks to me like it could be a 30 amp three wire circuit, not the 50 amp four wire standard up here.
I suggest that you check the breaker to the stove to confirm what amperage this circuit is currently operating at, and confirm that the gauge of the wire is appropriate for that amperage. Once that is done, check what the stove needs, so you know that the rating of the breaker and wire are adequate. As long as the circuit from the panel is configured to safely supply the amperage that the stove needs, I think that all you need to do is install a proper outlet into the wall. You shouldn't have to check this stuff, but that setup does not look to me like a reason to trust without verifying. Depending on the current electrical code in your area, you may have to replace the plug on the stove as well. It is possible that a three wire circuit used to be ok, not now.
All just guesswork on my part, so any electricians aboard here should speak up if I have missed anything. It is likely that the electrical code in your area is different from where I am, or that your stove does not need the 50 amp circuit standard up here.
Good luck with it
@Suki.