Better idea: fork Wordpress into something called TemplatePress, implement a templating engine which does not allow for arbitrary php code in themes, and see how well people like it. Chances are it will be dead within a year-- people choose Wordpress because it is easy to modify it to their own needs. They don't care about maintainability or cleanliness or portability.