performance – Optimization on php script

I have created a single php script

Here its url

require_once '../mageless/api_bootstrap.php';
$app = new LightApi();
$app->setOutput(());

http://sandbox.onlinephpfunctions.com/code/6b02915e8893cc6e51742460495a62ed004ca3b9

I am not much sure how can i optimise the best to perform well.

I think i have many methods for sql query so thinking about to convert it into one.

Though more optimization needed.

Pleas have a look and feel free to modify it & let me know thoughts