Parallelism is arranging words of identical syntactical constructions in sentences.
We need a parallel, i.e. identical, construction for the phrase plays that are funny. Obviously, the word <u>when</u> does not help to create parallelism in the corresponding phrase. The solution is simple: we should repeat the beginning of the phrase and change the adjective.
The result is a sentence with a parallel structure:
<u>Plays that are funny</u> are more popular than <u>plays that are tragic</u>.