10% debug-functions-time

Code Review | Find Slow Functions & Actions & Filters & Hooks (Debug Bar)

WordPress plugin Find Slow Functions & Actions & Filters & Hooks (Debug Bar) scored10%from 54 tests.

About plugin

  • Plugin page: debug-functions-time
  • Plugin version: 1.41
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.0+
  • WordPress version: 6.3.1
  • First release: Jul 10, 2019
  • Latest release: Jul 30, 2022
  • Number of updates: 58
  • Update frequency: every 19.2 days
  • Top authors: ttodua (72.41%)puvoxsoftware (29.31%)

Code review

54 tests

User reviews

8 reviews

Install metrics

10+ active /3,142 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Error in wp-content/plugins/debug-functions-time/library_wp.php+2677
    Uncaught Error: Class 'WP_Plugins_List_Table' not found in wp-content/plugins/debug-functions-time/library_wp.php:2677
    Stack trace:
    #0 wp-content/plugins/debug-functions-time/library_wp.php(2611): Puvox\wp_plugin->is_not_bulk_activation()
    #1 wp-includes/class-wp-hook.php(312): Puvox\wp_plugin->Puvox\{closure}()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/includes/plugin.php(720): do_action()

Server metrics [RAM: ▲2.26MB] [CPU: ▲10.25ms] Passed 4 tests

This is a short check of server-side resources used by Find Slow Functions & Actions & Filters & Hooks (Debug Bar)
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /5.77 ▲2.3155.71 ▲13.13
Dashboard /wp-admin5.59 ▲2.2465.66 ▲2.57
Posts /wp-admin/edit.php5.64 ▲2.2866.96 ▲19.65
Add New Post /wp-admin/post-new.php8.11 ▲2.2295.01 ▲5.64
Media Library /wp-admin/upload.php6.90 ▲3.6759.92 ▲25.08

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

A short overview of filesystem and database impact
Please try to fix the following items
  • There were 3 files (35.26KB) illegally modified outside of "wp-content/plugins/debug-functions-time/" and "wp-content/uploads/"
    • (modified) wp-config.php
    • (modified) wp-includes/class-wp-hook.php
    • (new file) wp-includes/class-wp-hook.php__DFTwp_BACKUP__1696824619.bak
Filesystem: 6 new files
Database: 1 new table, no new options
New tables
wp_debug_functions_time__errors_log

Browser metrics Passed 4 tests

Checking browser requirements for Find Slow Functions & Actions & Filters & Hooks (Debug Bar)
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,872 ▲12613.31 ▼1.121.88 ▲0.1762.56 ▲18.64
Dashboard /wp-admin2,278 ▲874.87 ▼0.03111.63 ▲2.5554.68 ▲12.19
Posts /wp-admin/edit.php2,164 ▲752.01 ▼0.0241.08 ▲6.8742.79 ▲7.06
Add New Post /wp-admin/post-new.php1,603 ▲8320.83 ▼2.27714.26 ▲18.1264.30 ▲9.69
Media Library /wp-admin/upload.php14,060 ▲12,6754.28 ▲0.0598.12 ▼4.77100.20 ▲56.86

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The plugin did not uninstall correctly, leaving 6 files (0.40MB) in the plugin directory
    • (new file) library_wp.php
    • (new file) languages/.empty
    • (new file) index.php
    • (new file) readme.txt
    • (new file) wp-loader-addition.php
    • (new file) library.php
  • Zombie tables were found after uninstall: 1 table
    • wp_debug_functions_time__errors_log

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Puvox\\library' not found in wp-content/plugins/debug-functions-time/library_wp.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function DebugFunctionsTimeMain\\is_admin() in wp-content/plugins/debug-functions-time/index.php:40
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/debug-functions-time/index.php on line 462
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/debug-functions-time/index.php on line 462

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Contributors: The plugin contributors field is missing
The official readme.txt is a good inspiration

debug-functions-time/index.php 85% from 13 tests

The main PHP file in "Find Slow Functions & Actions & Filters & Hooks (Debug Bar)" ver. 1.41 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 169 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("debug-functions-time.php" instead of "index.php")

Code Analysis 97% from 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
Success! There were no dangerous files found in this plugin3,936 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP41,3975,1663,936

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 1,076)
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity294.50
▷ Minimum class complexity2.00
▷ Maximum class complexity1,076.00
Average method complexity2.97
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods866
▷ Static methods10211.78%
▷ Public methods85798.96%
▷ Protected methods00.00%
▷ Private methods91.04%
Functions95
▷ Named functions66.32%
▷ Anonymous functions8993.68%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin