"Give a man a mask and he'll show you his true identity" are the words Oscar used. Oscar Wilde was a walking paradox in both his professional and personal lives. Here is a man who constantly vows a devotion towards the Catholic church while being a Protestant who also consistently detours from converting. A man who embodies in his "outer" life a complete Victorian with a wife, and children, while in his "inner" and secret life he is anything but.
This shows his tendencies as an artist to partially connect his inner and outer lives: The accepted and the not accepted into his art.Therefore, An Ideal Husband is a combination of paradox and sarcasm, but mostly mockery at the Victorian hyporcisy which permeated society: The stuffy homes with paraphernalia that meant nothing; the never-ending race to go up another echelon in the social stata. All those elements make "An Ideal Husband " a historical memento for what was going on at the time, and how people saw it behind closed doors. You might always want to add that , in a way, "An Ideal Husband" as well as many other Oscar works were a key to mental liberation, as he was certainly NOT the only Victorian who endured the cynic nature of his times, and the arrogance of his peers .
Wilde uses humor in several ways related to this. First, he uses it to make the masks we all wear more palatable. Second, he uses humor to show that even those who think they aren't wearing masks are: we all play roles. Third, he uses humor to show that we play roles by accident (being earnest /Earnest, etc.). Fourth, he uses humor to distract, thereby keeping people from looking for deeper selves.