Sort plugins by dependency