frontend is a bit special controller you should not add new methods there
better to use test.php or api.php controller
if you simply want frontend.php, guide attached:
For frontend example you can use simple controllers
\application\controllers\test.php
\application\controllers\fquick.php
For admin controllers, there are security mechanism, you need allow access for specific user type:
In file: \application\libraries\Admin_Controller.php
So by example add controller name for admin or other user type access