What I used to do... (and that maybe not a best way...)
I would start the engine and let it warm up, leave it running. then spray all with some kind of de-greaser cleaner and use pressure washer to hose it all down. Avoid spraying at full blast in areas where the connectors are, fuse box, air intake and spark plug coils. After that let engine run to dry it all out, turn it off and then put some shine on all plastic and rubber pieces. Do not spray directly on it. Spray on the piece of clothe, staying away from the car, and then wipe the needed areas.