74% nyx-tickets

Code Review | NYX Tickets

WordPress plugin NYX Tickets scored74%from 54 tests.

About plugin

  • Plugin page: nyx-tickets
  • Plugin version: 1.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-5.8
  • WordPress version: 6.3.1
  • First release: Aug 26, 2021
  • Latest release: Nov 23, 2021
  • Number of updates: 19
  • Update frequency: every 4.7 days
  • Top authors: klementinweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /339 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼3.44ms] Passed 4 tests

This is a short check of server-side resources used by NYX Tickets
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2342.76 ▲0.41
Dashboard /wp-admin3.40 ▲0.0950.60 ▲2.51
Posts /wp-admin/edit.php3.51 ▲0.1546.76 ▲0.50
Add New Post /wp-admin/post-new.php6.06 ▲0.1782.52 ▼17.18
Media Library /wp-admin/upload.php3.32 ▲0.0937.67 ▲3.15
Add New /wp-admin/post-new.php?post_type=ticket-areas3.3843.82
Nyx tickets /wp-admin/edit.php?post_type=ticket-areas3.3737.20
Nyx settings /wp-admin/edit.php?post_type=ticket-areas&page=nyx-settings3.2933.82

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

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

Browser metrics Passed 4 tests

NYX Tickets: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,032 ▲27113.95 ▼0.668.19 ▲6.4743.48 ▼0.23
Dashboard /wp-admin2,363 ▲1896.04 ▲0.3999.67 ▼0.1242.97 ▲1.22
Posts /wp-admin/edit.php2,248 ▲1482.49 ▲0.4734.88 ▼1.5229.48 ▼2.76
Add New Post /wp-admin/post-new.php1,566 ▲3823.47 ▲0.20657.05 ▲39.8936.82 ▼12.48
Media Library /wp-admin/upload.php1,562 ▲1624.54 ▲0.3596.50 ▲4.8942.41 ▲3.95
Add New /wp-admin/post-new.php?post_type=ticket-areas4,1133.6492.9234.26
Nyx tickets /wp-admin/edit.php?post_type=ticket-areas1,2312.5933.4527.90
Nyx settings /wp-admin/edit.php?post_type=ticket-areas&page=nyx-settings9472.0225.2824.80

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Nyx_Init::uninstall() should not be called statically
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/nyx-tickets/views/admin-boxes.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/nyx-tickets/views/full-list-view.php:55
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/nyx-tickets/views/compact-list-view.php:50
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/nyx-tickets/views/admin-settings.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/nyx-tickets/views/shortcode-content.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 96% from 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
3 plugin tags: nyx, party, tickets

nyx-tickets/nyx-ticket.php 92% from 13 tests

"NYX Tickets" version 1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("nyx-tickets.php" instead of "nyx-ticket.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected826 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP1113886500
CSS2832277
JavaScript421549

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.20
Average class complexity5.75
▷ Minimum class complexity2.00
▷ Maximum class complexity14.00
Average method complexity1.90
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods23
▷ Static methods1356.52%
▷ Public methods2295.65%
▷ Protected methods00.00%
▷ Private methods14.35%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin