Disable theme and plugin editing from WordPress Admin
Disable theme and plugin editing from WordPress Admin, By default WordPress allows to edit theme files and plugin files from WordPress Admin Panel. If you want to disallow client from editing files through WordPress Admin Panel. Just add this single line of code to wp-config.php file in WordPress Installation which is located at Root directory of WordPress.
As well as you can add this code to wp-config file and theme functions.php file, in both cases it’s working fine. I have tested in both cases. After adding this it will disable Plugin Editor (which is located on each plugin from plugin page) and Theme Editor (which is located at Appearance -> Editor).
Code to Disable theme and plugin editing from WordPress Admin
define( 'DISALLOW_FILE_EDIT', true );