How to fix wiring for garbage disposal?

How can I improve this straight wiring to the garbage disposal?
(The garbage disposal is on the same 20 Amp circuit with the dishwasher. The dishwasher is wired similarly. I will be replacing the kitchen cabinet.)
Replies
What exactly is wrong with the current configuration?
The electric wire is not protected. It goes straight from some junction box who knows where trough the wall and drywall out to the garbage disposal. Is this acceptable?
It's possibly acceptable. I guess a new cord with a plug and an outlet would be an improvement. The circuit also requires GFCI protection since all outlets located within six feet from a sink need to be GFCI protected.
Outlet.
Put the garbage disposal wire into an outlet box in the wall. Put a plug in cord on the disposal. Do the same for the DW. Don't worry about the circuit. It's not current (no pun intended) code but I've never known it to be a problem.
The usual configuration is to place an outlet under the sink somewhere and plug the disposal into that. (Pretty sure the last disposal I bought came with a standard 3-prong power cable already attached.) Usually the outlet is "switched" by a wall switch on the back wall above the counter, adjacent to the sink, since few disposals have built-in switches.
Air switch.
If there's no wall switch you can get an air switch. Easy to find at the big box stores or a plumbing supply. It plugs in to an unswitched outlet and the disposer plugs into it. An air tube leads to a button that can be mounted on the counter or on the face of a cabinet or almost anywhere. No electrical danger. No wiring.
Executed! With an extra hole I could not use because of a stud left from it! LOL