84% ticketrilla-server

Code Review | Ticketrilla: Server

WordPress plugin Ticketrilla: Server scored 84% from 54 tests.

About plugin

  • Plugin page: ticketrilla-server
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.1-5.7.2
  • WordPress version: 6.3.1
  • First release: Oct 12, 2019
  • Latest release: Jul 5, 2021
  • Number of updates: 10
  • Update frequency: every 63.3 days
  • Top authors: ticketrilla (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 610 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.64MB] [CPU: ▲5.03ms] Passed 4 tests

A check of server-side resources used by Ticketrilla: Server
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /5.10 ▲1.6448.81 ▼5.74
Dashboard /wp-admin4.94 ▲1.6358.30 ▲13.30
Posts /wp-admin/edit.php4.99 ▲1.6462.83 ▲13.86
Add New Post /wp-admin/post-new.php7.55 ▲1.6698.79 ▼1.01
Media Library /wp-admin/upload.php4.86 ▲1.6350.96 ▲13.55
Product settings /wp-admin/admin.php?page=ticketrilla-server-product-settings4.8748.78
General settings /wp-admin/admin.php?page=ticketrilla-server-general-settings5.0058.04
Tickets /wp-admin/admin.php?page=ticketrilla-server-tickets4.9648.92
Dashboard /wp-admin/admin.php?page=ticketrilla-server4.8852.84
Users /wp-admin/admin.php?page=ticketrilla-server-users4.9649.99
Licenses /wp-admin/admin.php?page=ticketrilla-server-licences4.9549.30

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 208 new files
Database: no new tables, 7 new options
New WordPress options
ttls_upgraded_version
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Ticketrilla: Server: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,878 ▲13213.65 ▼0.694.16 ▲2.3637.13 ▼10.19
Dashboard /wp-admin2,281 ▲905.90 ▲1.00109.45 ▲2.6843.82 ▼1.50
Posts /wp-admin/edit.php2,167 ▲782.17 ▲0.1741.44 ▲0.4839.09 ▲2.82
Add New Post /wp-admin/post-new.php1,592 ▲7823.21 ▲5.76675.56 ▲19.1363.03 ▲9.11
Media Library /wp-admin/upload.php1,469 ▲844.25 ▼0.03102.12 ▼1.8646.99 ▲5.52
Product settings /wp-admin/admin.php?page=ticketrilla-server-product-settings1,0954.2465.8347.29
General settings /wp-admin/admin.php?page=ticketrilla-server-general-settings1,9604.1863.9455.62
Tickets /wp-admin/admin.php?page=ticketrilla-server-tickets1,1624.2650.0532.88
Dashboard /wp-admin/admin.php?page=ticketrilla-server1,1514.2855.6238.53
Users /wp-admin/admin.php?page=ticketrilla-server-users1,6324.3453.4137.89
Licenses /wp-admin/admin.php?page=ticketrilla-server-licences1,3954.3059.2437.34

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • ttls_upgraded_version
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 27× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: paged in wp-content/plugins/ticketrilla-server/includes/admin/templates/page/ticketrilla-server-users-clients.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/ticketrilla-server/includes/admin/templates/page/ticketrilla-server-tickets.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'TTLS\\Helpers\\FormErrors' not found in wp-content/plugins/ticketrilla-server/includes/admin/templates/page/ticketrilla-server-save-product.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'TTLS_Attachments' not found in wp-content/plugins/ticketrilla-server/includes/admin/templates/page/ticketrilla-server-tickets-single.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/ticketrilla-server/includes/admin/templates/page/ticketrilla-server-general-settings.php:5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/ticketrilla-server/includes/admin/templates/page/ticketrilla-server-product-settings-modal.php on line 2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/ticketrilla-server/includes/admin/templates/page/ticketrilla-server-add-ticket-form.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/ticketrilla-server/includes/admin/templates/page/ticketrilla-server-addons.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ticketrilla-server/includes/core/ttls-actions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function TTLS() in wp-content/plugins/ticketrilla-server/includes/admin/templates/page/ticketrilla-server-add-ticket.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that require attention: Please take inspiration from this readme.txt

ticketrilla-server/ticketrilla-server.php 92% from 13 tests

The main file in "Ticketrilla: Server" v. 1.1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

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
Success! There were no dangerous files found in this plugin32,915 lines of code in 161 files:
LanguageFilesBlank linesComment linesLines of code
CSS12405113,036
PHP581,35976010,092
SVG6036,341
JavaScript831814902,372
PO File14887121,038
Markdown110036

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity26.19
▷ Minimum class complexity1.00
▷ Maximum class complexity177.00
Average method complexity4.52
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes37
▷ Abstract classes00.00%
▷ Concrete classes37100.00%
▷ Final classes12.70%
Methods265
▷ Static methods4717.74%
▷ Public methods23488.30%
▷ Protected methods145.28%
▷ Private methods176.42%
Functions48
▷ Named functions4287.50%
▷ Anonymous functions612.50%
Constants12
▷ Global constants541.67%
▷ Class constants758.33%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
21 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/admin/assets/js/ckeditor/skins/moono-lisa/images/refresh.png0.74KB0.33KB▼ 56.01%
includes/admin/assets/img/bootstrap-colorpicker/alpha.png0.48KB1.68KB0.00%
includes/admin/assets/js/ckeditor/plugins/icons.png3.37KB2.01KB▼ 40.52%
includes/admin/assets/js/ckeditor/plugins/icons_hidpi.png10.34KB5.18KB▼ 49.90%
includes/admin/assets/js/ckeditor/skins/moono-lisa/images/hidpi/close.png1.21KB0.47KB▼ 60.99%