Create sub-administrator role that can do everything except use or see the code editor
Your code isn’t working because WordPress deprecated user levels in version 3.0 (June 2010). What you want to do is create a plugin that upon activation, creates a new role for the owner of the site that is a clone of the administrator role, but cannot edit plugin or theme files. Those capabilities are edit_plugins … Read more