68% support-dock

Code Review | Support Dock

WordPress plugin Support Dock scored68%from 54 tests.

About plugin

  • Plugin page: support-dock
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.0
  • WordPress version: 6.3.1
  • First release: Dec 17, 2014
  • Latest release: Jan 8, 2015
  • Number of updates: 20
  • Update frequency: every 1.1 days
  • Top authors: cbfreeman (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,551 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.95MB] [CPU: ▼34.23ms] Passed 4 tests

An overview of server-side resources used by Support Dock
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.41 ▼2.45
Dashboard /wp-admin3.01 ▼0.3428.05 ▼37.09
Posts /wp-admin/edit.php3.01 ▼0.3528.11 ▼21.00
Add New Post /wp-admin/post-new.php3.01 ▼2.8831.44 ▼69.22
Media Library /wp-admin/upload.php3.01 ▼0.2228.01 ▼9.61
Support Dock /wp-admin/admin.php?page=sdock_options3.0123.56
Logs /wp-admin/admin.php?page=sdock_sent3.0129.97

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 15 new files
Database: 2 new tables, 6 new options
New tables
wp_sdtickets
wp_sdrecords
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Support Dock
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,942 ▲17114.08 ▼0.5010.04 ▲8.0444.13 ▼0.18
Dashboard /wp-admin2,235 ▲474.86 ▼1.01110.45 ▼9.8042.93 ▼4.00
Posts /wp-admin/edit.php2,118 ▲292.03 ▲0.0234.06 ▼4.0537.23 ▲2.94
Add New Post /wp-admin/post-new.php1,555 ▲2723.24 ▲0.34659.13 ▲4.6352.23 ▼8.47
Media Library /wp-admin/upload.php1,420 ▲294.30 ▲0.0997.31 ▼1.7245.69 ▲0.04
Support Dock /wp-admin/admin.php?page=sdock_options8062.0525.6529.90
Logs /wp-admin/admin.php?page=sdock_sent8032.0622.9826.57

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function add_menu_page was called incorrectly. The seventh parameter passed to add_menu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.)
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sdock_sent
    • > User notice in wp-includes/functions.php+5905
    Function add_menu_page was called incorrectly. The seventh parameter passed to add_menu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.)

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
The following issues need your attention
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/support-dock/sdock-options.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/support-dock/sdock-ticket.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/support-dock/sdock-view.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/support-dock/sdock-sent.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function site_url() in wp-content/plugins/support-dock/sdock-reply.php:5

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (Give the admin a great support tool with the options to view, reply or close tickets at will.), #2 (User can generate new tickets and reply to your support feedback on any ticket submitted.), #3 (Sample email you receive with support ticket details.)
The official readme.txt might help

support-dock/sdock.php 92% from 13 tests

"Support Dock" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("support-dock.php" instead of "sdock.php")

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 plugin1,996 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
CSS245501,249
PHP718459744
JavaScript11163

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.14
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods7100.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/icon.png0.58KB0.78KB0.00%