My opinions - - -> First of all your wife does not need a 40. A 9mm will have enough power to quickly dispatch any BG. There are different levels of power (terminal ballistics) available in 9mm ammo. Tons of different bullets at different vels.
There are some quite small 9mm's. Take a look at the Glock 43 or 26. Make sure that the weapon she chooses is big enough for her to get a proper grip on it. With size of weapon and power produced by weapon there is a "law of deminishing returns".
You can carry a 22LR or a 500S&W mag . . . what is right for you probably falls somewhere in between.
Ammo cost will be somewhat less with the 9mm also. Use the lower powered stuff at first. Gradually work up to her carry ammo,but even her carry ammo really does not have to be the kick ass,+P stuff.
Good luck with your search. Let us know what she decides on,and why. --- SAWMAN