68% wp-tracy

Code Review | WP Tracy

WordPress plugin WP Tracy scored68%from 54 tests.

About plugin

  • Plugin page: wp-tracy
  • Plugin version: 2.0.1
  • PHP compatiblity: 5.4.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Oct 20, 2015
  • Latest release: Oct 4, 2018
  • Number of updates: 26
  • Update frequency: every 41.5 days
  • Top authors: hlavacm (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

100+ active /3,697 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
Installer ran successfully

Server metrics [RAM: ▲0.66MB] [CPU: ▲3.33ms] Passed 4 tests

Analyzing server-side resources used by WP Tracy
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.13 ▲0.6647.15 ▲5.08
Dashboard /wp-admin3.97 ▲0.6661.24 ▲4.38
Posts /wp-admin/edit.php4.02 ▲0.6651.64 ▼0.84
Add New Post /wp-admin/post-new.php6.55 ▲0.66114.05 ▲14.42
Media Library /wp-admin/upload.php3.89 ▲0.6641.22 ▲4.71

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 76 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by WP Tracy
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲7815.43 ▲0.873.63 ▲1.9241.34 ▼0.89
Dashboard /wp-admin2,206 ▲266.05 ▲0.5189.36 ▼13.9444.03 ▲1.12
Posts /wp-admin/edit.php2,114 ▲142.49 ▲0.5038.91 ▲2.4935.26 ▼2.10
Add New Post /wp-admin/post-new.php1,537 ▲422.88 ▼0.12647.89 ▼34.3558.12 ▼3.85
Media Library /wp-admin/upload.php1,411 ▲174.56 ▲0.38104.48 ▲3.5944.51 ▼0.01

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 detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-tracy/vendor/tracy/tracy/tools/create-phar/create-phar.php
  • 19× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WpTracy\\WpPanelBase' not found in wp-content/plugins/wp-tracy/vendor/hlavacm/wp-tracy/src/panels/wppostpanel.class.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WpTracy\\WpPanelBase' not found in wp-content/plugins/wp-tracy/vendor/hlavacm/wp-tracy/src/panels/wpquerypanel.class.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Nette\\DI\\CompilerExtension' not found in wp-content/plugins/wp-tracy/vendor/tracy/tracy/src/Bridges/Nette/TracyExtension.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'WpTracy\\WpPanelBase' not found in wp-content/plugins/wp-tracy/vendor/hlavacm/wp-tracy/src/panels/wppanel.class.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WpTracy\\WpPanelBase' not found in wp-content/plugins/wp-tracy/vendor/hlavacm/wp-tracy/src/panels/wprewritepanel.class.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WpTracy\\WpPanelBase' not found in wp-content/plugins/wp-tracy/vendor/hlavacm/wp-tracy/src/panels/wpcurrentscreenpanel.class.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Tracy\\ILogger' not found in wp-content/plugins/wp-tracy/vendor/tracy/tracy/src/Tracy/Logger.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Tracy\\IBarPanel' not found in wp-content/plugins/wp-tracy/vendor/tracy/tracy/src/Tracy/DefaultBarPanel.php:15
    • > PHP Fatal error
      Trait 'Nette\\SmartObject' not found in wp-content/plugins/wp-tracy/vendor/tracy/tracy/src/Bridges/Nette/MailSender.php on line 17
    • > PHP Fatal error
      Uncaught Error: Class 'WpTracy\\WpPanelBase' not found in wp-content/plugins/wp-tracy/vendor/hlavacm/wp-tracy/src/panels/wprolespanel.class.php:10

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
2 plugin tags: debugger, tracy

wp-tracy/index.php 92% from 13 tests

The entry point to "WP Tracy" version 2.0.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-tracy.php" instead of "index.php")

Code Analysis 5% from 3 tests

File types 0% from 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
Please fix the following items
  • Do not include executable or dangerous files in your plugin
    • .cmd - Command Script in Windows
      • wp-content/plugins/wp-tracy/vendor/tracy/tracy/tools/open-in-editor/windows/install.cmd
5,581 lines of code in 71 files:
LanguageFilesBlank linesComment linesLines of code
PHP507668553,452
JavaScript519439860
CSS414620620
Markdown41530317
JSON400187
PO File1181871
Bourne Shell2294268
DOS Batch1206

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity21.59
▷ Minimum class complexity1.00
▷ Maximum class complexity138.00
Average method complexity4.74
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces4
Interfaces2
Traits0
Classes25
▷ Abstract classes14.00%
▷ Concrete classes2496.00%
▷ Final classes00.00%
Methods149
▷ Static methods6845.64%
▷ Public methods12080.54%
▷ Protected methods21.34%
▷ Private methods2718.12%
Functions34
▷ Named functions1441.18%
▷ Anonymous functions2058.82%
Constants8
▷ Global constants00.00%
▷ Class constants8100.00%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin