Performance improvement commits

Performance improvement commits regarding https://github.com/Mvied/wordpress-https/issues/16 .