I probably spent a day or two many, many years ago learning about Executive orders in constitutional law. Haven't studied it since. My sorta recollection was that there were areas where executive orders were given the power of law by the Constitution, things like recess appointments. Then there were things that were given the power of law by Congressional assignment, like the invasion of Iraq. Then I think there are Executive orders that have the power from the agency being in the executive branch, things like the Justice Department and homeland security (I think).
Then there are executive orders that are of dubious power, things for which the President probably doesn't have the power, but does it anyway. Things like desegregation public schools under Eisenhower apparently fit into this category.
It seems to me that most of what gets discussed about with regard to Executive Orders generally finds it's way into the Executive Branch part. The criticism would probably be more accurate that the executive branch is too big an intrusive, rather than that the orders themselves are illegal. Without researching it, I vaguely recall that each of the last few presidents have made a lot of these type orders.