How can I measure CPU and RAM used by my theme or plugin

I kept on researching and this is the best I’ve found and have been doing so far:

  1. Enable all logs on settings and wp-config: Debugging in WordPress.
  2. Install the following plugins for developers. You can learn about them and how they can help you by going to the respective’s plugin page:

Should I find more or if anyone has anything to add, we can edit the answer for future new WordPress developers.