By default, the WordPress admin has the ability to modify theme files or plugins in Appearance → Editor. But there may be situations where you need to show the admin to a customer or editor. If you don’t want any of them to be able to change your files, you should add this line to the wp-config.php
file, which is in the root of the site.
// Disable the ability to edit files in the admin panel for themes and plugins.
define( 'DISALLOW_FILE_EDIT', true );