No, Diary of a Wimpy Kid is not historical fiction.
It is contemporary realistic fiction (middle-grade humor).
Occasional historical references (e.g., a school project) are incidental, not central. The series is firmly rooted in the "now."