Conspect of an article from InfoWorld by Peter Wayner
Use Lint tool to make an automatical “code review” based on rules.
Optimize your code using profiler.
Remove unnecessary logging.
CodeGuru from Amazon is tool, that looks for issues and have AI competence.
Optimize database for speed and stability.
Maybe your application can profit from a cache.
Reduce data amount needed by your application. E.g. don't save photos in RAW format. Or if the user uploads such photos - restrict him to use only optimized images.
API toolkits like Swagger can help you to create APIs if it can be necessary for your application.
Sometimes it can be worth to extract some code to a library (or many libraries).
Write documentation for your code.
Splitting the application into many microservices can help to make the project more granular.
Containers can be very handy in some situations.
Now that serverless computing options are growing more common, it may be smart to extract the essential functions from your code and deploy them to a serverless platform like AWS Lambda or Azure Functions. The bills are computed by the call, so you’ll pay nothing for fallow periods when there’s no incoming traffic. If your code is already well constructed and doesn’t require any local state, it is often easy to extract the business logic from your app and rewrap it in a simple function call used by a serverless system.
Sometimes there are a good reasons to make a native app from a web based application.
Sometimes it can be also worth to go in the other direction: from mobile to the web.
Make the refactoring process permanent.