Code Profiler

Beschreibung

A profiler to measure the performance of your WordPress plugins and themes.

Code Profiler measures the performance of your plugins and themes at the PHP level, and helps you to quickly find any potential problem in your WordPress installation. It generates an extremely detailed and easy to read analysis in the form of charts and tables that shows not only which plugin or theme, but also which PHP script, class, method and function is slowing down your website. It displays many useful additional information such as file I/O operations and disk I/O usage as well.
It makes it very simple to locate any bottleneck problem in your themes or plugins in order to solve it and speed up your website.

Features

  • Plugins & themes performance profiling.
  • [Pro] Scripts performance profiling.
  • [Pro] Methods & functions performance profiling.
  • [Pro] File I/O operations monitoring.
  • File I/O statistics.
  • Disk I/O monitoring.
  • WP-CLI integration.
  • Export charts in PNG image format.
  • [Pro] Export all tables and charts in CSV file format.
  • [Pro] Filtering options

Learn more about Code Profiler Pro.

Screenshots

  • Running the profiler.
  • Plugins and Themes performance section.
  • WP-CLI integration.
  • File I/O statistics.
  • Disk I/O statistics.
  • [Pro version]: Scripts performance.
  • [Pro version]: Methods and Functions performance.
  • [Pro version]: CSV Export.
  • [Pro version]: CSV Export.
  • [Pro version]: File I/O List

Installation

  1. Upload the ZIP file from the WordPress „Plugins > Add New“ menu.
  2. Activate the plugin.
  3. Plugin settings are located in the ‚Code Profiler‘ menu.

FAQ

What are the differences between Code Profiler and services such as Google PageSpeed or GTmetrix?

They are completely different: Code Profiler analyzes the code performance of your plugins and themes on your server, at the PHP level. Google PageSpeed and GTmetrix, instead, analyze the content of a web page from a browser’s perspective.

Will Code Profiler work if I have a caching plugin or a PHP opcode cache, or if my website is using a CDN service?

In most cases, Code Profiler will be able to bypass caching from plugins and CDN services, as well as your PHP opcode cache. If there were a problem, it would warn you about it.

Will Code Profiler show slow database queries?

Code Profiler profiles your PHP code, not the database. However, if you had a slow query in your code, the profiler would show you the class, method or function where it is located.

Why do I see numbers such as „3E-06“ or „1.2E-05“ after opening the CSV file with my spreadsheet editor?

Spreadsheet editors such as LibreOffice Calc and Microsoft Excel can use scientific exponential notation to display very small numbers, for instance, 0.000025 will become 2.5e-5. Select the whole column of numbers and, in the toolbar of your spreadsheet editor, click the button to increase the number of decimals to 6.

Why do some scripts show an execution time of 0 second?

That can happen if your PHP version is 7.1 or 7.2. With those versions, Code Profiler can only use microseconds for its metrics, while with versions 7.3 and above it can use the system’s high resolution time in nanoseconds. It can also happen if a PHP script has only a couple of lines of code, its execution time is too quick to be measured, hence it will show 0.

Why does Code Profiler Pro warn me that I have multiple plugins using Composer?

Composer, a tool for dependency management in PHP, is included in many popular plugins and themes. It is used to autoload PHP classes.
Code Profiler (Pro version only) will inform you if two or more activated plugins use it because you will need to take it into consideration when reading and interpreting the results. Let’s take an example:
Assuming you have 4 plugins: A, B, C and D. Both plugins A and D include and require Composer. WordPress will start and load plugin A, which will run an instance of Composer to load its classes. Immediately after, WordPress will load plugins B and C. Then, it will load plugin D, which too will need to load its classes. However, plugin D will not start a new instance of Composer but, instead, will rely on the one from plugin A to load its own classes.
As a result, the execution time of plugin A will increase (its instance of Composer is used to load classes for plugin C too), while the execution time of plugin C will decrease (it doesn’t need to start a new instance of Composer).
That is not a problem at all when you are profiling your website but, assuming you are a developer and just want to profile a plugin that you wrote and that includes Composer, you will need to disable any other plugin using Composer in order to get the most accurate results for your plugin only.

Is Code Profiler multisite compatible?

Code Profiler is multisite compatible. Note however that for security reasons, only the superadmin can run it.

What are the requirements for running Code Profiler?

  • WordPress >=5.0.
  • PHP >=7.1 or 8.x.

What is your Privacy Policy?

Code Profiler does not collect any private data from you or your visitors. It does not use cookies either. Your website can run Code Profiler and be compliant with the General Data Protection Regulation (GDPR) or other similar privacy laws.

Rezensionen

21. Januar 2022
Thanks for writing this free plugin, I was looking for such plugin since years, since the P3 plugin is not maintained and makes websites crashing. It's simple, fast, and easy to use!
Alle 2 Rezensionen lesen

Mitwirkende & Entwickler

„Code Profiler“ ist Open-Source-Software. Folgende Menschen haben an diesem Plugin mitgewirkt:

Mitwirkende

Übersetze „Code Profiler“ in deine Sprache.

Interessiert an der Entwicklung?

Durchstöbere den Code, sieh dir das SVN Repository an oder abonniere das Entwicklungsprotokoll per RSS.

Änderungsprotokoll

1.1.1

  • Fixed a potential error when running the profiler.

1.1

  • Added support for WP-CLI: you can run the profiler from a terminal. Enter wp code-profiler help to display the available command line options. WP-CLI integration can be turned on/off in the plugin „Settings“ page.
  • Updated Chart.js library.
  • [Pro version]: Updated Codemirror libraries.
  • Small fixes and adjustments.

1.0.1

  • Added compatibility with blogs that have permalinks disabled (e.g., ?page_id=1 or ?p=1).
  • Added compatibility with child pages (e.g., /foo/bar/).
  • Added some extra HTTP headers to prevent aggressive caching.

1.0

  • Initial release.