I want to speed up a code that calculates profits and views for articles in WordPress and shows them in a table according to the category and author of the article
the idea is
after choosing a classification, author and date
Each article is calculated separately and this leads to many calculations as the number of articles may reach about 2000 articles
If you have previously interacted with Google Analytics API and WordPress, you can contact me to try to develop the code.
The code is written in PHP