From my experience, 1/2" plywood won't stop much of anything in the way of bullets. Maybe a .25 auto, or a pellet pistol. A .22 pistol shoots right through it.
A 2x4 may or may not be another story. A 9mm would very likely penetrate it, while a .380 may or may not, and a .32 ACP probably wouldn't. A lot depends on the wetness of the wood, what kind of wood the 2x4 is made of, and the ammo used.
But in all seriousness, testing on such things really won't tell you much more than you can read online, and might prove less. The angle of the head where hit can be a huge factor on whether or not a bullet will penetrate.
Of more importance is your ability, as the shooter, to hit your target with the mouse gun. Small guns are almost invariably harder to shoot than their larger companions, and as caliber and power go up, so does recoil. As recoil goes up, many shooters' accuracy goes down; especially with small pistols. Small mistakes in aiming are far more noticeable on target with a short barrel than they are with a longer barrel, too.
If you have a range available that rents firarms, it's likely money well spent to go try a few before you buy. If not, try to find someone near you who will let you try their's. You might even find a kind person at a range who will let you shoot their firearm a few times to see if you like what they're using.
With a small pocket pistol, you shouldn't be looking as much for bone smashing power as you should for something you can shoot well.