68% tickettool

Code Review | TicketTool

WordPress plugin TicketTool scored68%from 54 tests.

About plugin

  • Plugin page: tickettool
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-3.8
  • WordPress version: 6.3.1
  • First release: Oct 7, 2012
  • Latest release: Jan 19, 2014
  • Number of updates: 26
  • Update frequency: every 18.0 days
  • Top authors: msdn11 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,060 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.92MB] [CPU: ▼33.07ms] Passed 4 tests

Server-side resources used by TicketTool
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.83 ▲2.44
Dashboard /wp-admin3.04 ▼0.3123.45 ▼31.59
Posts /wp-admin/edit.php3.04 ▼0.3222.29 ▼21.72
Add New Post /wp-admin/post-new.php3.04 ▼2.8522.89 ▼67.95
Media Library /wp-admin/upload.php3.04 ▼0.1922.47 ▼11.01
TicketTool options /wp-admin/options-general.php?page=tickettool/index.php3.0421.50

Server storage [IO: ▲0.33MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by TicketTool
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.32 ▲0.051.71 ▲0.1543.34 ▲2.69
Dashboard /wp-admin2,199 ▲225.63 ▲0.1090.75 ▲5.2341.60 ▲0.17
Posts /wp-admin/edit.php2,101 ▲41.96 ▼0.0434.01 ▼1.2034.42 ▼2.91
Add New Post /wp-admin/post-new.php1,531 ▲523.25 ▲0.20605.21 ▼84.3249.25 ▼4.00
Media Library /wp-admin/upload.php1,404 ▲104.19 ▼0.0496.35 ▲0.5941.20 ▼1.17
TicketTool options /wp-admin/options-general.php?page=tickettool/index.php9832.0024.8928.40

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=tickettool/index.php
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=tickettool/index.php
    • > Notice in wp-content/plugins/tickettool/index.php+21
    Undefined index: tickettool_page
    • > GET request to /wp-admin/options-general.php?page=tickettool/index.php
    • > Notice in wp-content/plugins/tickettool/index.php+44
    Undefined variable: lang_select

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
Please take a closer look at the following
  • 1× 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/tickettool/index.php:305

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
  • Screenshots: These screenshots require images: #1 (Settings screen), #2 (Imported page example), #3 (Event seats hall plan page example)
The official readme.txt is a good inspiration

tickettool/index.php 92% from 13 tests

This is the main PHP file of "TicketTool" version 1.0.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("tickettool.php" instead of "index.php")

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
Good job! No executable or dangerous file extensions detected301 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1358269
CSS10032

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected