88% yticket-for-wp

Code Review | yTicket for WP

WordPress plugin yTicket for WP scored 88% from 54 tests.

About plugin

  • Plugin page: yticket-for-wp
  • Plugin version: 1.5.7
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-4.4.2
  • WordPress version: 5.8.1
  • First release: May 23, 2013
  • Latest release: Apr 11, 2016
  • Number of updates: 43
  • Update frequency: every 24.5 days
  • Top authors: imseosrl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,052 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.15MB] [CPU: ▼149.15ms] Passed 4 tests

An overview of server-side resources used by yTicket for WP
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.83 ▲0.1139.11 ▲12.25
Dashboard /wp-admin3.10 ▲0.0554.65 ▲8.13
Posts /wp-admin/edit.php3.15 ▲0.0555.13 ▲3.87
Add New Post /wp-admin/post-new.php4.69 ▼0.7560.26 ▼604.52
Media Library /wp-admin/upload.php3.04 ▲0.0435.22 ▼4.06

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 25 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

yTicket for WP: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,725 ▲12916.22 ▲0.2712.45 ▲2.3751.10 ▼10.42
Dashboard /wp-admin2,979 ▲486.07 ▲0.06158.01 ▼22.78141.04 ▲21.54
Posts /wp-admin/edit.php2,773 ▲342.70 ▼0.0069.51 ▼15.13101.75 ▲8.64
Add New Post /wp-admin/post-new.php1,696 ▲1316.03 ▼2.67434.61 ▼13.36116.49 ▼0.88
Media Library /wp-admin/upload.php1,767 ▼404.99 ▼0.05150.27 ▼40.25146.65 ▲22.69

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/yticket-for-wp/help/help-en-US.php
    • > /wp-content/plugins/yticket-for-wp/functions/yt_check.php
    • > /wp-content/plugins/yticket-for-wp/functions/yt_save.php
    • > /wp-content/plugins/yticket-for-wp/help/help-it-IT.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/yticket-for-wp/admin.php:56
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/yticket-for-wp/functions.php:71
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/yticket-for-wp/functions.php:71

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: help desk, ticket, trouble ticketing system, yticket

yticket-for-wp/index.php 85% from 13 tests

The principal PHP file in "yTicket for WP" v. 1.5.7 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("yticket-for-wp.php" instead of "index.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 141 characters long)

Code Analysis Passed 3 tests

File types Passed 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
There were no executable files found in this plugin5,357 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
CSS24,525264,658
PHP117879417
JavaScript317787282

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants70
▷ Global constants70100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 compressed PNG files occupy 0.02MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/glyphicons-halflings.png12.50KB10.35KB▼ 17.19%
img/glyphicons-halflings-white.png8.57KB9.20KB0.00%
img/yTicketicon.png0.71KB0.74KB0.00%
img/block.png1.26KB0.78KB▼ 37.97%