74% nirweb-support

Code Review | Nirweb support

WordPress plugin Nirweb support scored 74% from 54 tests.

About plugin

  • Plugin page: nirweb-support
  • Plugin version: 3.0.2.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2.2
  • WordPress version: 6.3.1
  • First release: May 11, 2021
  • Latest release: Jun 13, 2023
  • Number of updates: 40
  • Update frequency: every 19.1 days
  • Top authors: nirweb (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

1,000+ active / 14,374 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.23MB] [CPU: ▲12.42ms] Passed 4 tests

A check of server-side resources used by Nirweb support
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2447.01 ▲4.78
Dashboard /wp-admin3.53 ▲0.2266.60 ▲13.53
Posts /wp-admin/edit.php3.64 ▲0.2976.82 ▲28.36
Add New Post /wp-admin/post-new.php6.13 ▲0.24106.53 ▲16.59
Media Library /wp-admin/upload.php3.45 ▲0.2252.08 ▲14.76
All tickets /wp-admin/admin.php?page=nirweb_ticket_manage_tickets&tab=all_ticket3.6256.30
Tickets0 /wp-admin/admin.php?page=nirweb_ticket_manage_tickets3.6156.54
Create ticket /wp-admin/admin.php?page=nirweb_ticket_send_ticket3.6059.57
Departments /wp-admin/admin.php?page=nirweb_ticket_department_ticket3.4452.41
Settings /wp-admin/admin.php?page=nirweb_ticket_settings3.5766.37
List of uploaded files /wp-admin/admin.php?page=nirweb_ticket_uploads_file3.4352.00
Canned replies /wp-admin/edit.php?post_type=pre_answer_wpyticket3.4956.26
FAQ /wp-admin/admin.php?page=nirweb_ticket_FAQ_ticket3.4957.25

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 90 new files
Database: 7 new tables, 6 new options
New tables
wp_nirweb_ticket_ticket_user_upload
wp_nirweb_ticket_ticket_faq
wp_nirweb_ticket_ticket_department
wp_nirweb_ticket_ticket_status
wp_nirweb_ticket_ticket_priority
wp_nirweb_ticket_ticket
wp_nirweb_ticket_ticket_answered
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Nirweb support
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,948 ▲14813.85 ▼0.576.08 ▲4.2641.94 ▼2.40
Dashboard /wp-admin2,266 ▲605.23 ▲0.40115.74 ▲4.1942.24 ▼0.04
Posts /wp-admin/edit.php2,149 ▲602.34 ▲0.3339.95 ▲2.8434.36 ▼0.79
Add New Post /wp-admin/post-new.php1,574 ▲3223.26 ▲5.17614.78 ▲18.2654.00 ▲4.44
Media Library /wp-admin/upload.php1,451 ▲664.52 ▲0.2798.41 ▼2.2843.76 ▲0.29
All tickets /wp-admin/admin.php?page=nirweb_ticket_manage_tickets&tab=all_ticket1,1001.8828.0430.92
Tickets0 /wp-admin/admin.php?page=nirweb_ticket_manage_tickets1,1001.8727.7032.11
Create ticket /wp-admin/admin.php?page=nirweb_ticket_send_ticket1,8056.98144.8758.13
Departments /wp-admin/admin.php?page=nirweb_ticket_department_ticket9201.8727.5223.87
Settings /wp-admin/admin.php?page=nirweb_ticket_settings11,24412.52375.74133.54
List of uploaded files /wp-admin/admin.php?page=nirweb_ticket_uploads_file8861.8828.1829.64
Canned replies /wp-admin/edit.php?post_type=pre_answer_wpyticket1,1102.2833.6329.62
FAQ /wp-admin/admin.php?page=nirweb_ticket_FAQ_ticket1,5606.81123.9539.62

Uninstaller [IO: ✅] [DB: ▲0.01MB] 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
  • This plugin does not fully uninstall, leaving 7 tables in the database
    • wp_nirweb_ticket_ticket_faq
    • wp_nirweb_ticket_ticket_answered
    • wp_nirweb_ticket_ticket
    • wp_nirweb_ticket_ticket_department
    • wp_nirweb_ticket_ticket_user_upload
    • wp_nirweb_ticket_ticket_priority
    • wp_nirweb_ticket_ticket_status
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 62× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/nirweb-support/core/settings/box_3_p.php:4
    • > PHP Warning
      Use of undefined constant NIRWEB_SUPPORT_INC_ADMIN_FUNCTIONS_TICKET - assumed 'NIRWEB_SUPPORT_INC_ADMIN_FUNCTIONS_TICKET' (this will throw an Error in a future version of PHP) in wp-content/plugins/nirweb-support/inc/admin/themes/department.php on line 1
    • > PHP Warning
      Use of undefined constant NIRWEB_SUPPORT_INC_USER_FUNCTIONS_TICKET - assumed 'NIRWEB_SUPPORT_INC_USER_FUNCTIONS_TICKET' (this will throw an Error in a future version of PHP) in wp-content/plugins/nirweb-support/inc/user/themes/home.php on line 2
    • > PHP Fatal error
      require(): Failed opening required 'NIRWEB_SUPPORT_INC_ADMIN_FUNCTIONS_TICKETfunc_list_tickets.php' (include_path='.:/usr/share/php') in wp-content/plugins/nirweb-support/inc/admin/themes/process_ticket.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/nirweb-support/core/settings/css.php:4
    • > PHP Warning
      require(NIRWEB_SUPPORT_INC_ADMIN_FUNCTIONS_TICKETfunc_upload_file.php): failed to open stream: No such file or directory in wp-content/plugins/nirweb-support/inc/admin/themes/file_uploads.php on line 2
    • > PHP Warning
      Use of undefined constant NIRWEB_SUPPORT_INC_ADMIN_FUNCTIONS_TICKET - assumed 'NIRWEB_SUPPORT_INC_ADMIN_FUNCTIONS_TICKET' (this will throw an Error in a future version of PHP) in wp-content/plugins/nirweb-support/inc/user/themes/new_ticket.php on line 3
    • > PHP Warning
      require(NIRWEB_SUPPORT_INC_USER_FUNCTIONS_TICKETfunc_u_list_ticket.php): failed to open stream: No such file or directory in wp-content/plugins/nirweb-support/inc/user/themes/home.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/nirweb-support/core/settings/file.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/nirweb-support/core/settings/box_e.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: support, support ticket, ticket system, helpdesk

nirweb-support/nirweb-support.php Passed 13 tests

The primary PHP file in "Nirweb support" version 3.0.2.1 is used by WordPress to initiate all plugin functionality
101 characters long description:
NirWeb support is a great help desk and support plugin for WordPress with full support of WooCommerce

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin12,229 lines of code in 70 files:
LanguageFilesBlank linesComment linesLines of code
CSS11520775,442
PHP51514804,943
PO File25788401,202
JavaScript59533603
SVG10039

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods114.29%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions109
▷ Named functions6458.72%
▷ Anonymous functions4541.28%
Constants15
▷ Global constants15100.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
5 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png2.39KB2.39KB0.00%
assets/images/defualt-logo.png1.87KB1.43KB▼ 23.76%
assets/images/delete.png1.45KB1.45KB0.00%
assets/images/upload.png1.48KB0.91KB▼ 38.44%
assets/images/attachfile.png1.84KB1.82KB▼ 0.96%