74% fluent-query-logger

Code Review | Fluent Query Logger - Log Database Queries and analyze plugin database performance

WordPress plugin Fluent Query Logger - Log Database Queries and analyze plugin database performance scored74%from 54 tests.

About plugin

  • Plugin page: fluent-query-logger
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Jul 15, 2022
  • Latest release: Jul 16, 2022
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: techjewel (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /1,521 total downloads

Benchmarks

Plugin footprint 65% 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 gracefully, with no errors

Server metrics [RAM: ▲0.92MB] [CPU: ▲1.70ms] Passed 4 tests

This is a short check of server-side resources used by Fluent Query Logger - Log Database Queries and analyze plugin database performance
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.36 ▲0.9045.01 ▲1.98
Dashboard /wp-admin4.26 ▲0.9550.63 ▲2.39
Posts /wp-admin/edit.php4.31 ▲0.9549.52 ▲4.01
Add New Post /wp-admin/post-new.php6.85 ▲0.9784.24 ▼1.59
Media Library /wp-admin/upload.php4.12 ▲0.8940.23 ▲6.59
Fluent Query Logs /wp-admin/tools.php?page=fluent-query-logger5.1941.40

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 143 new files
Database: 1 new table, 6 new options
New tables
wp_fql_logs
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Fluent Query Logger - Log Database Queries and analyze plugin database performance
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.20 ▼1.181.95 ▼0.3540.41 ▼7.64
Dashboard /wp-admin2,213 ▲225.88 ▼0.0297.42 ▼13.5938.88 ▼0.91
Posts /wp-admin/edit.php2,093 ▲42.06 ▲0.0035.84 ▲2.5332.51 ▼1.96
Add New Post /wp-admin/post-new.php1,539 ▲523.36 ▲0.26675.68 ▼18.5453.76 ▼7.08
Media Library /wp-admin/upload.php1,395 ▲134.21 ▲0.0298.43 ▲3.2041.05 ▼0.12
Fluent Query Logs /wp-admin/tools.php?page=fluent-query-logger1,2695.27136.3557.22

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie tables detected upon uninstall: 1 table
    • wp_fql_logs
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 57× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'FluentQueryLogger\\Framework\\Support\\ArrayableInterface' not found in wp-content/plugins/fluent-query-logger/vendor/wpfluent/framework/src/WPFluent/Database/Orm/Model.php:38
    • > PHP Notice
      Undefined variable: app in wp-content/plugins/fluent-query-logger/boot/globals.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'FluentQueryLogger\\Framework\\Database\\Query\\Grammar' not found in wp-content/plugins/fluent-query-logger/vendor/wpfluent/framework/src/WPFluent/Database/Query/MySqlGrammar.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'FluentQueryLogger\\Framework\\Http\\Controller' not found in wp-content/plugins/fluent-query-logger/app/Http/Controllers/Controller.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'FluentQueryLogger\\App\\Http\\Controllers\\Controller' not found in wp-content/plugins/fluent-query-logger/app/Http/Controllers/LogsController.php:8
    • > PHP Fatal error
      Trait 'FluentQueryLogger\\Framework\\Support\\MacroableTrait' not found in wp-content/plugins/fluent-query-logger/vendor/wpfluent/framework/src/WPFluent/Database/Query/Builder.php on line 20
    • > PHP Fatal error
      Trait 'FluentQueryLogger\\Framework\\Request\\FileHandler' not found in wp-content/plugins/fluent-query-logger/vendor/wpfluent/framework/src/WPFluent/Request/Request.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'FluentQueryLogger\\Framework\\Database\\Orm\\Model' not found in wp-content/plugins/fluent-query-logger/vendor/wpfluent/framework/src/WPFluent/Database/Orm/Relations/Pivot.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'FluentQueryLogger\\Framework\\Foundation\\RequestGuard' not found in wp-content/plugins/fluent-query-logger/app/Http/Requests/UserRequest.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'FluentQueryLogger\\Framework\\Pagination\\PaginatorInterface' not found in wp-content/plugins/fluent-query-logger/vendor/wpfluent/framework/src/WPFluent/Pagination/LengthAwarePaginatorInterface.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: database query logger, query monitor addon

fluent-query-logger/fluent-query-logger.php Passed 13 tests

This is the main PHP file of "Fluent Query Logger - Log Database Queries and analyze plugin database performance" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
44 characters long description:
Query Logger Add-On for Query Monitor Plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin13,084 lines of code in 133 files:
LanguageFilesBlank linesComment linesLines of code
PHP1273,84810,39512,951
JSON300130
JavaScript1011
Markdown1001
SVG1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity13.06
▷ Minimum class complexity1.00
▷ Maximum class complexity187.00
Average method complexity1.90
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces23
Interfaces16
Traits10
Classes82
▷ Abstract classes1012.20%
▷ Concrete classes7287.80%
▷ Final classes00.00%
Methods1,495
▷ Static methods15710.50%
▷ Public methods1,16878.13%
▷ Protected methods31921.34%
▷ Private methods80.54%
Functions94
▷ Named functions44.26%
▷ Anonymous functions9095.74%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin