The red copper wire was burned so I took out the burnt part of the wire and reinserted all the wires by myself.
You should trim the extra copper off it will not help to have it hanging out there. You also need to make sure when you put things back together the clamp is on the covering for the cable not the individual wires but other than those items I would say it looks safe. A proper torque would be needed to be 100%.
The wires are way too long, they need to be shortened and the sheath of the flex needs to be secured under the cord grip. The stripped section at the end of the wire should be long enough that the screw can properly clamp down on it but not excessively long.
Ideally the live wire should have no slack the neutral wire a medium amount of slack and the earth wire should have the most slack. This way in the unlikely event that the cord grip fails and the cable gets ripped out of the plug the wires should become disconnected in the safest possible order.
Also personally I would not reuse a plug that had shown signs of heat damage.