Assuming you’ve read the following two posts (on the single responsibility principle and WordPress submenus), then this is a good place to tear apart the code and start trying to apply the principle.

If on the other hand, you haven’t read the posts, there are two things to note. First, the single responsibility principle says the following:
A class should have only one reason to change.
Secondly, review the code in this gist as this is the basis for the rest of the content of this article. Specifically, I’m going to be taking the above principle and try to apply it to the code.

