Twig extensions optimization

@kayue Fixed in https://github.com/kayue/KayueWordpressBundle/pull/58, thanks!