WordPress allows you to edit your plugin and theme files directly through its admin panel. Although handy, this is dangerous because a single typo can render your website blank. Moreover, you may want to give admin access to people that don’t need to edit code.
You can do this in under a minute. Open your wp-config.php file and add the following constant:
Now, when you’re in the dashboard it is impossible to access the theme or plugin editor, even with the admin account.
For more reference check WordPress codex
Thank You !!