Not sure about that, so I checked with an online exif viewer:
smc PENTAX-DA 18-55mm F3.5-5.6 AL WR
Shot at 18 mm
Manual exposure, Not Defined, 1/30 sec, f/22, ISO 80, Compensation: -1/2
Subject Distance Range: Distant
So here we go:
Subject distance range - the focus is based on distant and at F22, everything SHOULD be in focus.
However, shooting at F22 on an APS-C sensor is going to introduce a lot of diffraction, and that can make the image soft. With the 18-55, I believe the sharpest apertures are F8-F11. Shooting beyond F13 will start to make things quite soft, especially if you are pixel peeping.
The 18-55 kit lens is a pretty good lens, but it's not going to be outstanding if you are used to better lenses.
http://farm7.staticflickr.com/6203/6060681385_d7154e6477_o.jpg
^full size image - shot at F11. Definitely better than yours at F22.