Optimize class ProtocolAds for more Ads plugins.