The built-in file editor gives anyone with an admin login a way to write PHP on the server.
define( 'DISALLOW_FILE_EDIT', true );
This line in wp-config.php removes the Theme File Editor and the Plugin File Editor from the admin menus. It is a small step against a stolen admin password, but it does not stop installing or updating plugins from the dashboard. That is a separate constant, DISALLOW_FILE_MODS. Put the line above the comment that says to stop editing. Your own edits then go through SFTP, git or a deploy script.
Further reading: WordPress: Editing wp-config.php