78% tickset

Code Review | Tickset

WordPress plugin Tickset scored 78% from 54 tests.

About plugin

  • Plugin page: tickset
  • Plugin version: 2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Jan 23, 2020
  • Latest release: Feb 10, 2020
  • Number of updates: 12
  • Update frequency: every 2.7 days
  • Top authors: khromov (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 519 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▲1,014.52ms] 50% from 4 tests

Analyzing server-side resources used by Tickset
It is recommended to improve the following
  • CPU: Total CPU usage must kept under 500.00ms (currently 2,282.78ms on /wp-admin/options-general.php?page=tickset)
  • Extra CPU: Try to keep extra CPU usage under 200.00ms (currently 1,014.52ms on /wp-admin/options-general.php?page=tickset)
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.201,055.05 ▲1,015.10
Dashboard /wp-admin3.48 ▲0.181,114.48 ▲1,065.72
Posts /wp-admin/edit.php3.53 ▲0.181,065.22 ▲1,019.17
Add New Post /wp-admin/post-new.php6.04 ▲0.161,125.10 ▲1,019.87
Media Library /wp-admin/upload.php3.34 ▲0.121,038.85 ▲1,003.92
Tickset /wp-admin/options-general.php?page=tickset3.332,282.78

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 42 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Tickset
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,892 ▲14614.47 ▼0.291.67 ▼0.2635.81 ▼10.97
Dashboard /wp-admin2,283 ▲955.88 ▲0.9998.25 ▼10.1791.11 ▲47.14
Posts /wp-admin/edit.php2,184 ▲952.02 ▼0.0436.84 ▼1.5235.01 ▲2.10
Add New Post /wp-admin/post-new.php1,734 ▲22020.74 ▲3.26697.90 ▲16.4037.00 ▼30.96
Media Library /wp-admin/upload.php1,480 ▲924.18 ▼0.0397.29 ▼8.4383.49 ▲39.43
Tickset /wp-admin/options-general.php?page=tickset1,1392.1228.4731.56

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/tickset/tickset.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tickset/includes/shortcodes.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=tickset
    • > Network (severe)
    wp-json/tickset/v1/verify_api_key - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: events, event-management, event

tickset/tickset.php Passed 13 tests

"Tickset" version 2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
31 characters long description:
Sell tickets digitally. Simple.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin8,698 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
JSON3007,224
PHP678125497
SVG12011466
JavaScript52919210
PO File14042123
CSS326692
Sass311169
Markdown18017

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity6.25
▷ Minimum class complexity2.00
▷ Maximum class complexity11.00
Average method complexity2.19
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods17
▷ Static methods529.41%
▷ Public methods1694.12%
▷ Protected methods00.00%
▷ Private methods15.88%
Functions15
▷ Named functions533.33%
▷ Anonymous functions1066.67%
Constants8
▷ Global constants8100.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
3 PNG files occupy 0.19MB with 0.08MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-api-key.png4.18KB2.26KB▼ 46.02%
assets/tinymce.png5.35KB5.27KB▼ 1.52%
assets/gutenberg.png184.39KB52.94KB▼ 71.29%