For a 7 day trip, I would skip Yogya. If possible, can you lengthen your trip?
If you go to Yogya for the temples, please check their opening days and hours. I did not, and was unable to see both sites.
If you arrive to Indo via Jakarta, then maybe do a morning flight to Yogya, do the temples and the next morning fly to Bali.