Wireless sensor networks (WSNs) are large networks comprised of small sensor nodes, which are capable of sensing data from the surrounding environment, and forwarding the data collected from other sensor nodes to the sink. For energy efficient operation of WSNs, considerable research has been going on in the area of Medium Access Control (MAC) protocol design. The IEEE 802.15.4 MAC has been designed to suit the requirement of low power sensor nodes. In this paper, the performance analysis of a WSN employing 802.15.4 MAC has been carried out, using packet size as the optimization criterion. The resulting simulations show the variation in Packet Delivery Ratio (PDR), average end-to-end delay and remaining energy with different packet sizes.