Hi, I will list the dtc codes and their description below for you, I hope this helps you ;)
P0400 Exhaust Gas Recirculation (EGR) No/Low Flow Detected (could be a dirty or blocked egr valve, might be worth cleaning it out)
P0325 Knock Sensor Circuit Malfunction (could be a faulty sensor, plug, wiring - doesn't usually cause performance issues)
P0304 Cylinder 4 Misfire (check ignition/fuel/air/compression components if fault returns)
The egr valve might be worth taking off and cleaning out, i'm not sure if it's done in the us, but in the uk, some people choose to blank these off purposely, if the dtc does not put the Engine Management Light (EML) on then the benefits can be a cleaner engine internally as it does not recycle the exhaust gas through the intake.
The knock sensor could just be a case of a faulty sensor, wiring harness issue, it's rare for it to be the ecu but it does happen.
It could of shown up when it picked up the misfire, or it could of picked up a misfire on the sensors feedback, the knock sensor and crank position sensor would of set;
Cylinder 4 misfire, this could be a plug, lead, coil, injector, compression, wiring etc, hopefully if the codes remain cleared it was just an intermittent issue and all that would be advised is a basic service and fuel treatment.
I hope this helps explain what the codes where and I hope they stay cleared!