83% query-monitor-twig-profile

Code Review | Query monitor Twig profile

WordPress plugin Query monitor Twig profile scored83%from 54 tests.

About plugin

  • Plugin page: query-monitor-twi...
  • Plugin version: 1.3.6
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.0-6.0.0
  • WordPress version: 6.3.1
  • First release: Sep 17, 2020
  • Latest release: Jun 3, 2022
  • Number of updates: 13
  • Update frequency: every 48.0 days
  • Top authors: nielsdeblaauw (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /11,267 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.22ms] Passed 4 tests

Analyzing server-side resources used by Query monitor Twig profile
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.41 ▼0.0525.51 ▼17.69
Dashboard /wp-admin3.33 ▲0.0355.78 ▲2.95
Posts /wp-admin/edit.php3.38 ▲0.0349.46 ▼3.45
Add New Post /wp-admin/post-new.php5.91 ▲0.0395.65 ▼14.35
Media Library /wp-admin/upload.php3.26 ▲0.0337.21 ▲2.61

Server storage [IO: ▲2.07MB] [DB: ▲0.00MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Query monitor Twig profile
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,454 ▼30714.19 ▼0.160.49 ▼1.1920.71 ▼23.16
Dashboard /wp-admin2,189 ▲125.49 ▼0.1689.92 ▼5.5338.42 ▼3.57
Posts /wp-admin/edit.php2,100 ▼02.15 ▲0.1736.04 ▼3.8033.00 ▼2.06
Add New Post /wp-admin/post-new.php1,526 ▼623.27 ▲0.12682.57 ▲3.4971.89 ▲13.67
Media Library /wp-admin/upload.php1,397 ▼04.22 ▲0.02102.88 ▼1.3846.07 ▼1.91

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\Profiler\\Dumper\\BaseDumper' not found in wp-content/plugins/query-monitor-twig-profile/src/class-jsondumper.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\Profiler\\Dumper\\BaseDumper' not found in wp-content/plugins/query-monitor-twig-profile/src/class-dumper.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'QM_Output_Html' not found in wp-content/plugins/query-monitor-twig-profile/src/class-output.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'QM_Collector' not found in wp-content/plugins/query-monitor-twig-profile/src/class-collector.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function NdB\\QM_Twig_Profile\\add_filter() in wp-content/plugins/query-monitor-twig-profile/query-monitor-twig-profile.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Tags: There are too many tags (11 tag instead of maximum 10)
The official readme.txt might help

query-monitor-twig-profile/query-monitor-twig-profile.php 85% from 13 tests

This is the main PHP file of "Query monitor Twig profile" version 1.3.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Requires PHP: Required version does not match the one declared in readme.txt ("7.0" instead of "7.0.0")
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin34,640 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
JSON30027,486
JavaScript51,0021,3926,660
PHP649242271
Vuejs Component2170189
Markdown15019
XML15010
HTML1305

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity4.20
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes480.00%
Methods20
▷ Static methods00.00%
▷ Public methods1260.00%
▷ Protected methods630.00%
▷ Private methods210.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin