ADDED TO ANSWER THE COMMENT BELOW. I do not know any explicit expression for the Milnor number, I think that in general you cannot avoid to compute the $\mathbb{C}$-basis for the Milnor algebra. I agree that these computations are tedious by hand, however you can use a Computer Algebra software like SINGULAR (which is free) to do this quickly and easily.
And yes, there are similar conditions for $D_k$ and $E_6$, $E_7$, $E_8$. Let me state the condition for $D_k$.
Let $f \in \boldsymbol{m}^3 \subset \mathcal{O}_o$ and $k \geq 4$. Denote by $f^{(3)}$ the $3$-jet of $f$. Then the following are equivalent:
Moreover, $f^{(3)}$ factors into three different factors if and only if $f$ is of type $D_4$.
The conditions for $E_6$, $E_7$, $E_8$ are a bit more complicate and I will not state them here. You will find them in the book of GREUEL, LOSSEN and SHUSTIN, p. 154.

