This is a two way hidden door. It uses a pressure plate on each side going each way and closes as you pass. This is the smallest i can figure to make, 2 blocks tall, 3 blocks under your feet, and 4 blocks wide. To keep it small the moving part is recessed one block deep to hide the two sticky pistons.
The assembly will appear with you to the north of it, and going to the west. Change the stone blocks to blocks of your choice. Pictured is as i have it installed in a set of book shelves.
If anyone has a better or smaller i'd like to see it, but this is what i came up with. thanks.
MC v1.18.2
CREATIONS
MINECRAFT-SCHEMATICS.COM