He did write them all, he's pretty inconsistent.

At the moment, my favourite writers in Doctor Who are Richard Curtis and Neil Gaiman, but Curtis only wrote 1 episode and Gaiman has only written 2.