Magento 2 Plugin Limitations

Limitations

Plugins can not be used on following:

  • Final methods
  • Final classes
  • Non-public methods
  • Class methods (such as static methods)
  • __construct
  • Virtual types
  • Objects that are instantiated before Magento\Framework\Interception is bootstrapped

Magento 2 Custom Router and the Dreaded 100 matches

public function match (\Magento\Framework\App\RequestInterface $request)
{
    if (strpos($request->getPathInfo(), 'test') === false) return;
    $request->setModuleName(‘MyCompany_MyModule’)
       ->setControllerName('test')->setActionName('test');

    return $this->actionFactory->create(
        \Magento\Framework\App\Action\Forward::class, ['request' => $request]
    );
}

https://magento.stackexchange.com/questions/135532/magento-2-ce-front-controller-reached-100-router-match-iterations-issue