10% q-support

Code Review | Q Support

WordPress plugin Q Support scored10%from 54 tests.

About plugin

  • Plugin page: q-support
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.1.0
  • WordPress version: 6.3.1
  • First release: Oct 17, 2013
  • Latest release: Jan 17, 2016
  • Number of updates: 79
  • Update frequency: every 10.4 days
  • Top authors: qlstudio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,651 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
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > User deprecated in wp-includes/functions.php+5453
    Function get_currentuserinfo is deprecated since version 4.5.0! Use wp_get_current_user() instead.

Server metrics [RAM: ▼0.23MB] [CPU: ▼29.21ms] Passed 4 tests

Server-side resources used by Q Support
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.10 ▲0.5945.03 ▼1.88
Dashboard /wp-admin3.75 ▲0.4134.29 ▼24.13
Posts /wp-admin/edit.php3.76 ▲0.3530.28 ▼21.13
Add New Post /wp-admin/post-new.php3.75 ▼2.1831.60 ▼67.89
Media Library /wp-admin/upload.php3.76 ▲0.4834.53 ▼3.70
Data /wp-admin/edit.php?post_type=q_support&page=data3.7631.73
Ask a Question /wp-admin/post-new.php?post_type=q_support3.7628.59
Questions /wp-admin/edit.php?post_type=q_support3.7632.44

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 65 new files
Database: no new tables, 9 new options
New WordPress options
db_upgraded
recovery_mode_email_last_sent
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
q_support_options
widget_theysaidso_widget
widget_recent-comments
q_support_poll

Browser metrics Passed 4 tests

Checking browser requirements for Q Support
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,905 ▲15914.35 ▲0.002.10 ▲0.5944.10 ▲3.71
Dashboard /wp-admin2,250 ▲735.64 ▲0.1389.68 ▼5.3384.14 ▲40.09
Posts /wp-admin/edit.php2,173 ▲912.19 ▲0.1636.67 ▲0.6535.55 ▲0.61
Add New Post /wp-admin/post-new.php1,610 ▲8418.03 ▼5.66724.99 ▲14.9860.91 ▲4.56
Media Library /wp-admin/upload.php1,470 ▲704.33 ▲0.17102.76 ▼10.5883.30 ▲32.87
Data /wp-admin/edit.php?post_type=q_support&page=data7491.548.9928.15
Ask a Question /wp-admin/post-new.php?post_type=q_support2,3747.79169.92121.07
Questions /wp-admin/edit.php?post_type=q_support1,1702.2735.2529.46

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5453
    Function get_currentuserinfo is deprecated since version 4.5.0! Use wp_get_current_user() instead.
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • recovery_mode_email_last_sent
    • q_support_poll
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=q_support
    • > User deprecated in wp-includes/functions.php+5453
    Function get_currentuserinfo is deprecated since version 4.5.0! Use wp_get_current_user() instead.
    • > GET request to /wp-admin/edit.php?post_type=q_support&page=data
    • > Error in wp-content/plugins/q-support/library/Q_Errors.class.php+305
    Uncaught TypeError: Argument 1 passed to Q_Errors::log_exception() must be an instance of Exception, instance of Error given in wp-content/plugins/q-support/library/Q_Errors.class.php:305
    Stack trace:
    #0 [internal function]: Q_Errors->log_exception()
    #1 {main}
    thrown
  • 36 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=q_support
    • > POST request to /wp-cron.php?doing_wp_cron=1697551793.8827230930328369140625
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 36 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=q_support
    • > POST request to /wp-cron.php?doing_wp_cron=1697551793.8827230930328369140625
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

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
  • 16× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'kintParser' not found in wp-content/plugins/q-support/library/kint/parsers/custom/microtime.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Kint' not found in wp-content/plugins/q-support/library/kint/decorators/rich.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'kintParser' not found in wp-content/plugins/q-support/library/kint/parsers/custom/json.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'kintParser' not found in wp-content/plugins/q-support/library/kint/parsers/custom/xml.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'kintParser' not found in wp-content/plugins/q-support/library/kint/parsers/custom/arrayobject.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'kintParser' not found in wp-content/plugins/q-support/library/kint/parsers/custom/splobjectstorage.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/q-support/library/Q_Admin.class.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'kintParser' not found in wp-content/plugins/q-support/library/kint/parsers/custom/timestamp.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'kintParser' not found in wp-content/plugins/q-support/library/kint/parsers/custom/color.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'kintParser' not found in wp-content/plugins/q-support/library/kint/parsers/custom/splfileinfo.php:2

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Support Request Form), #2 (Support Tracking), #3 (Q Support Website)
The official readme.txt is a good inspiration

q-support/q-support.php 92% from 13 tests

Analyzing the main PHP file in "Q Support" version 1.2.0
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 156 characters long)

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
    • .reg - Registry Data File in Windows
      • wp-content/plugins/q-support/library/kint/scripts/source.reg
    • .vbs - VBScript File in Windows
      • wp-content/plugins/q-support/library/kint/scripts/source.vbs
5,610 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
PHP291,9852,1354,128
JavaScript416366485
LESS48922342
PO File1119130291
CSS4321157
Markdown21080141
Visual Basic1142442
JSON10024

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity30.44
▷ Minimum class complexity1.00
▷ Maximum class complexity112.00
Average method complexity5.62
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes25
▷ Abstract classes14.00%
▷ Concrete classes2496.00%
▷ Final classes00.00%
Methods160
▷ Static methods9056.25%
▷ Public methods10766.88%
▷ Protected methods2415.00%
▷ Private methods2918.12%
Functions11
▷ Named functions1090.91%
▷ Anonymous functions19.09%
Constants16
▷ Global constants16100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
11 PNG files occupy 0.21MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon_flag_green_16.png0.63KB0.78KB0.00%
screenshot-3.png87.64KB36.63KB▼ 58.21%
images/icon_wp_support_32.png2.19KB1.64KB▼ 25.26%
screenshot-1.png73.44KB32.91KB▼ 55.18%
images/icon_wp_support_16.png0.80KB0.80KB0.24%