67% code-profiler

Code Review | Code Profiler - WordPress Performance Profiling and Debugging Made Easy

WordPress plugin Code Profiler - WordPress Performance Profiling and Debugging Made Easy scored67%from 54 tests.

About plugin

  • Plugin page: code-profiler
  • Plugin version: 1.6.5
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Dec 8, 2021
  • Latest release: Oct 5, 2023
  • Number of updates: 78
  • Update frequency: every 8.6 days
  • Top authors: bruandet (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

4,000+ active /48,771 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▲1.51ms] Passed 4 tests

This is a short check of server-side resources used by Code Profiler - WordPress Performance Profiling and Debugging Made Easy
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2041.47 ▲4.41
Dashboard /wp-admin3.49 ▲0.1955.23 ▲4.03
Posts /wp-admin/edit.php3.61 ▲0.2550.34 ▼1.43
Add New Post /wp-admin/post-new.php6.07 ▲0.1997.82 ▼0.96
Media Library /wp-admin/upload.php3.42 ▲0.1944.23 ▲6.36

Server storage [IO: ▲1.47MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Please fix the following
  • The plugin illegally modified 1 file (1.30KB) outside of "wp-content/plugins/code-profiler/" and "wp-content/uploads/"
    • (new file) wp-content/mu-plugins/0----code-profiler.php
Filesystem: 51 new files
Database: no new tables, 7 new options
New WordPress options
code-profiler
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Code Profiler - WordPress Performance Profiling and Debugging Made Easy: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.27 ▼1.021.88 ▲0.1545.57 ▼0.10
Dashboard /wp-admin2,209 ▲214.88 ▼0.97108.51 ▲2.7069.00 ▲27.26
Posts /wp-admin/edit.php2,107 ▲152.06 ▼0.0039.09 ▼3.7332.96 ▼4.11
Add New Post /wp-admin/post-new.php1,681 ▲16222.80 ▼0.36623.32 ▲8.7651.82 ▲2.35
Media Library /wp-admin/upload.php1,403 ▲154.24 ▼0.04112.39 ▲8.0947.20 ▲1.43

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/code-profiler/uninstall.php+27
    Constant CODE_PROFILER_VERSION already defined
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 23× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/code-profiler/lib/menu_support.php
    • > /wp-content/plugins/code-profiler/lib/menu.php
    • > /wp-content/plugins/code-profiler/uninstall.php
    • > /wp-content/plugins/code-profiler/lib/menu_view_iostats.php
    • > /wp-content/plugins/code-profiler/lib/menu_profiler.php
    • > /wp-content/plugins/code-profiler/lib/menu_pro.php
    • > /wp-content/plugins/code-profiler/lib/help.php
    • > /wp-content/plugins/code-profiler/lib/class-stream.php
    • > /wp-content/plugins/code-profiler/lib/class-report.php
    • > /wp-content/plugins/code-profiler/lib/menu_view_profile.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/code-profiler/lib/i18n-extra.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
10 plugin tags: speed, optimize, performance, profiling, debugging...

code-profiler/index.php 85% from 13 tests

This is the main PHP file of "Code Profiler - WordPress Performance Profiling and Debugging Made Easy" version 1.6.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Main file name: Name the main plugin file the same as the plugin slug ("code-profiler.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin5,126 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP247829934,230
JavaScript378110666
CSS11220230

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity38.83
▷ Minimum class complexity18.00
▷ Maximum class complexity81.00
Average method complexity4.12
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods74
▷ Static methods22.70%
▷ Public methods5067.57%
▷ Protected methods00.00%
▷ Private methods2432.43%
Functions47
▷ Named functions4493.62%
▷ Anonymous functions36.38%
Constants18
▷ Global constants18100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
13 PNG files occupy 0.99MB with 0.53MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
static/preview/iolist.png109.01KB34.78KB▼ 68.09%
static/preview/connections.png99.84KB31.28KB▼ 68.67%
static/preview/scripts.png101.54KB33.57KB▼ 66.94%
static/help/http_method.png22.35KB8.17KB▼ 63.47%
static/dashicon-16x16.png0.18KB0.18KB0.00%