Assuming there’s enough room in the closet, the cats probably won’t mind their litter box in the closet and installing a cat door in the closet door is a great solution. They like to do their business in a sheltered and quiet space that’s easy to access. Most cats will prefer a closet to a basement, attic, or laundry room.
You may want to consider the thickness of the closet door. The PlexiDor door kit is designed to fit a standard household door, and if the closet door is thinner, you may need to use some extra pieces of wood to build up under the frame. It isn’t a problem or difficult to do, just something to keep in mind.
Will you have other things in the closet? In such a small area, you are likely to get some kitty litter dust on things. Depending on the closet size you may also need some type of ventilation, because the “litter box smell” will be concentrated to such a small area.
Another things to consider is light. Cats see much better in the dark than we do and most cats won’t have an issue with the dusk inside the closet, but they may still appreciate a night-light.