65% triagetrak

Code Review | WebSitter Pro

WordPress plugin WebSitter Pro scored65%from 54 tests.

About plugin

  • Plugin page: triagetrak
  • Plugin version: 4.0.11
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.8.1
  • WordPress version: 6.3.1
  • First release: Sep 24, 2019
  • Latest release: Jan 28, 2022
  • Number of updates: 63
  • Update frequency: every 13.6 days
  • Top authors: bluebaden (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,071 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.76MB] [CPU: ▲2.79ms] Passed 4 tests

An overview of server-side resources used by WebSitter Pro
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.87 ▲1.4136.81 ▼4.23
Dashboard /wp-admin5.20 ▲1.8961.39 ▲8.23
Posts /wp-admin/edit.php5.26 ▲1.9163.20 ▲12.13
Add New Post /wp-admin/post-new.php8.30 ▲2.42103.34 ▼4.99
Media Library /wp-admin/upload.php5.06 ▲1.8354.52 ▲17.59
Settings /wp-admin/admin.php?page=triage-trak-main-settings5.0368.35
Import /wp-admin/admin.php?page=triage-trak-import5.0253.66
Authentication /wp-admin/admin.php?page=triage-trak5.0345.98

Server storage [IO: ▲16.52MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 701 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
triage-trak-main-settings
db_upgraded
widget_tt_search_bar
widget_recent-comments
widget_theysaidso_widget

Browser metrics 75% from 4 tests

This is an overview of browser requirements for WebSitter Pro
You may want to improve the following
  • Nodes: Try to keep the DOM nodes under 25,000 (currently 43,799 on /wp-admin/admin.php?page=triage-trak-main-settings)
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,910 ▲14913.41 ▼0.948.46 ▲6.7637.28 ▼5.50
Dashboard /wp-admin2,218 ▲405.64 ▼0.1094.34 ▼15.6771.42 ▲26.92
Posts /wp-admin/edit.php2,135 ▲352.03 ▲0.0339.21 ▼2.6936.72 ▲1.13
Add New Post /wp-admin/post-new.php1,580 ▲4923.37 ▲0.27705.98 ▲43.1854.20 ▲1.25
Media Library /wp-admin/upload.php1,429 ▲264.17 ▼0.2099.59 ▼11.6085.07 ▲36.60
Settings /wp-admin/admin.php?page=triage-trak-main-settings43,7995.27291.91114.53
Import /wp-admin/admin.php?page=triage-trak-import8612.0427.6629.26
Authentication /wp-admin/admin.php?page=triage-trak8462.1627.9132.18

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 8 options
    • can_compress_scripts
    • triage-trak-main-settings
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_tt_search_bar
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 209 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=triage-trak-main-settings
    • > Notice in wp-content/plugins/triagetrak/admin/custom-styles/doctors/doctors-dynamic-styles.php+28
    Undefined index: doc_photo
  • 25916 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=triage-trak-main-settings
    • > Notice in wp-content/plugins/triagetrak/admin/custom-styles/doctors/doctor-buttons-dynamic-styles.php+55
    Trying to access array offset on value of type null
  • 209 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=triage-trak-main-settings
    • > Notice in wp-content/plugins/triagetrak/admin/custom-styles/doctors/doctors-dynamic-styles.php+32
    Undefined index: doc_photo_border
  • 209 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=triage-trak-main-settings
    • > Notice in wp-content/plugins/triagetrak/admin/custom-styles/doctors/doctors-dynamic-styles.php+41
    Undefined index: doc_card_info_border_radius
  • 209 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=triage-trak-main-settings
    • > Notice in wp-content/plugins/triagetrak/admin/custom-styles/doctors/doctors-dynamic-styles.php+48
    Undefined index: doc_card_info_border
  • 418 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=triage-trak-main-settings
    • > Notice in wp-content/plugins/triagetrak/admin/custom-styles/doctors/doctor-cards-dynamic-styles.php+19
    Undefined index: card_border_radius
  • 418 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=triage-trak-main-settings
    • > Notice in wp-content/plugins/triagetrak/admin/custom-styles/doctors/doctor-cards-dynamic-styles.php+26
    Undefined index: card_border
  • 418 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=triage-trak-main-settings
    • > Notice in wp-content/plugins/triagetrak/admin/custom-styles/doctors/doctor-buttons-dynamic-styles.php+21
    Undefined index: doc_btn_radius
  • 418 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=triage-trak-main-settings
    • > Notice in wp-content/plugins/triagetrak/admin/custom-styles/doctors/doctor-buttons-dynamic-styles.php+28
    Undefined index: doc_btn_border
  • 418 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=triage-trak-main-settings
    • > Notice in wp-content/plugins/triagetrak/admin/custom-styles/doctors/doctor-buttons-dynamic-styles.php+42
    Undefined index: doc_filter_btn_radius
  • 418 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=triage-trak-main-settings
    • > Notice in wp-content/plugins/triagetrak/admin/custom-styles/doctors/doctor-buttons-dynamic-styles.php+49
    Undefined index: doc_filter_btn_border
  • 209 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=triage-trak-main-settings
    • > Notice in wp-content/plugins/triagetrak/admin/custom-styles/locations/locations-dynamic-styles.php+30
    Undefined index: loc_photo
  • 209 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=triage-trak-main-settings
    • > Notice in wp-content/plugins/triagetrak/admin/custom-styles/locations/locations-dynamic-styles.php+34
    Undefined index: loc_photo_border
  • 209 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=triage-trak-main-settings
    • > Notice in wp-content/plugins/triagetrak/admin/custom-styles/locations/locations-dynamic-styles.php+43
    Undefined index: loc_card_info_border_radius
  • 209 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=triage-trak-main-settings
    • > Notice in wp-content/plugins/triagetrak/admin/custom-styles/locations/locations-dynamic-styles.php+50
    Undefined index: loc_card_info_border
  • 209 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=triage-trak-main-settings
    • > Notice in wp-content/plugins/triagetrak/admin/custom-styles/locations/location-cards-dynamic-styles.php+16
    Undefined index: loc_card_border_radius
  • 209 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=triage-trak-main-settings
    • > Notice in wp-content/plugins/triagetrak/admin/custom-styles/locations/location-cards-dynamic-styles.php+23
    Undefined index: loc_card_border
  • 209 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=triage-trak-main-settings
    • > Notice in wp-content/plugins/triagetrak/admin/custom-styles/locations/location-buttons-dynamic-styles.php+21
    Undefined index: loc_btn_radius
  • 209 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=triage-trak-main-settings
    • > Notice in wp-content/plugins/triagetrak/admin/custom-styles/locations/location-buttons-dynamic-styles.php+28
    Undefined index: loc_btn_border
  • 209 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=triage-trak-main-settings
    • > Notice in wp-content/plugins/triagetrak/admin/custom-styles/locations/location-buttons-dynamic-styles.php+42
    Undefined index: loc_filter_btn_radius
  • 209 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=triage-trak-main-settings
    • > Notice in wp-content/plugins/triagetrak/admin/custom-styles/locations/location-buttons-dynamic-styles.php+49
    Undefined index: loc_filter_btn_border

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 6× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/triagetrak/admin/view/admin/triage-trak-admin-display.php
    • > /wp-content/plugins/triagetrak/admin/view/locations/location-card-template.php
    • > /wp-content/plugins/triagetrak/admin/view/admin/triage-trak-import-display.php
    • > /wp-content/plugins/triagetrak/admin/view/doctors/doctor-card-template.php
    • > /wp-content/plugins/triagetrak/includes/class-triage-trak-ajax.php
    • > /wp-content/plugins/triagetrak/admin/view/departments/department-card-template.php
  • 85× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_terms() in wp-content/plugins/triagetrak/admin/shortcodes/departments-list/templates/departments-list-template.php:2
    • > PHP Warning
      Use of undefined constant TRIAGE_TRAK_BASE_DIR - assumed 'TRIAGE_TRAK_BASE_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/triagetrak/admin/shortcodes/lib/load.php on line 2
    • > PHP Warning
      Use of undefined constant TRIAGE_TRAK_BASE_DIR - assumed 'TRIAGE_TRAK_BASE_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/triagetrak/admin/shortcodes/doctors-slider/load.php on line 2
    • > PHP Warning
      Use of undefined constant TRIAGE_TRAK_BASE_DIR - assumed 'TRIAGE_TRAK_BASE_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/triagetrak/admin/controller/class-doctors-triage-trak.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/triagetrak/admin/view/modals/doctors-slider-shortcode-form.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/triagetrak/admin/widgets/search-bar/search.php:2
    • > PHP Warning
      Use of undefined constant TRIAGE_TRAK_BASE_DIR - assumed 'TRIAGE_TRAK_BASE_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/triagetrak/admin/shortcodes/departments-list/load.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'Triage_Trak_Locations' not found in wp-content/plugins/triagetrak/admin/view/locations/templates/locations-list.php:13
    • > PHP Warning
      require_once(TRIAGE_TRAK_BASE_DIRadmin/controller/class-doctors-triage-trak.php): failed to open stream: No such file or directory in wp-content/plugins/triagetrak/admin/controller/class-import-changes-triage-trak.php on line 15
    • > PHP Fatal error
      Uncaught Error: Interface 'TriageTrak\\Modules\\Shortcodes\\Lib\\ShortcodeInterface' not found in wp-content/plugins/triagetrak/admin/shortcodes/departments-list/departments-list.php:15

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=triage-trak-main-settings
    • > Network (severe)
    http://fonts.googleapis.com/css?family=%20: - Failed to load resource: the server responded with a status of 400 (Bad Request)

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
  • Donate link: Please fix this invalid URI: "None"
  • Plugin Name: Please specify the plugin name on the first line ( === WebSitter Pro === )
You can take inspiration from this readme.txt

triagetrak/triage-trak.php 85% from 13 tests

Analyzing the main PHP file in "WebSitter Pro" version 4.0.11
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("triagetrak.php" instead of "triage-trak.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 185 characters long)

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
Good job! No executable or dangerous file extensions detected59,977 lines of code in 610 files:
LanguageFilesBlank linesComment linesLines of code
JSON10019,667
JavaScript4282,8418,94513,219
PHP1343,0492,87512,419
CSS224453128,422
Sass16464182,895
SVG8002,678
PO File1294626677

PHP code Passed 2 tests

This is a very shot 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.47
Average class complexity15.86
▷ Minimum class complexity1.00
▷ Maximum class complexity198.00
Average method complexity4.14
▷ Minimum method complexity1.00
▷ Maximum method complexity61.00
Code structure
Namespaces5
Interfaces1
Traits0
Classes68
▷ Abstract classes11.47%
▷ Concrete classes6798.53%
▷ Final classes00.00%
Methods325
▷ Static methods4413.54%
▷ Public methods28888.62%
▷ Protected methods154.62%
▷ Private methods226.77%
Functions64
▷ Named functions6093.75%
▷ Anonymous functions46.25%
Constants16
▷ Global constants637.50%
▷ Class constants1062.50%
▷ Public constants10100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
24 PNG files occupy 0.16MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/exopite-simple-options/assets/images/ui-bg_flat_0_888888_40x100.png0.17KB0.08KB▼ 51.40%
admin/exopite-simple-options/assets/images/ui-bg_glass_25_e1f0f5_1x400.png0.11KB0.11KB0.00%
admin/img/MenuIcon.png5.64KB0.71KB▼ 87.39%
admin/img/tt_icon.png4.47KB1.74KB▼ 61.10%
admin/exopite-simple-options/assets/images/ui-icons_bf3030_256x240.png4.27KB4.11KB▼ 3.78%