You can run romex on the surface of a wall as long as it is not exposed to anthing that will damage the wire. As far as putting a plug end on the romex
Sounds good, as for the plug end, what is the issue, is it a code thing, or is it actually unsafe?
What I'm planning to do is this: I'll cut a small hole in the drywall near the ceiling and above the plug and run that section inside the drywall, from inside the plug box I'll try to fetch the end of the wire and wire it in directly with the plug. Then back to the top where I made my hole, I'll run the cable on the ceiling of the closet and then run it to the back section of the top of the door and make a hole, then run it to the box which will be outside the closet. I might even have a box inside since while I'm at it, may as well have a light in the closet too. Then I'll use some plastic conduit to cover the cable just so it is cleaner, and protected, though it will only be exposed on the ceiling and small part of the wall so it would be safe on it's own.
Is this better? No need for a plug end this way, and there will be less romex exposed. Not sure how hard it will be to catch the wire end from inside the plug box though.
It is a NFPA code issue. Unless the wire is rated for in wall use, you cannot do it that way. Since you are going to the trouble of punching holes, just do as we have stated over & over, run from a remodel box Romex, to an outlet to hard wire correctly.