84% balfolk-tickets

Code Review | Balfolk Tickets

WordPress plugin Balfolk Tickets scored84%from 54 tests.

About plugin

  • Plugin page: balfolk-tickets
  • Plugin version: 1.3.0
  • PHP compatiblity: 5.6.32+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.2.3
  • WordPress version: 6.3.1
  • First release: Mar 21, 2018
  • Latest release: Sep 7, 2019
  • Number of updates: 76
  • Update frequency: every 7.1 days
  • Top authors: filipbe (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,043 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▲0.56ms] Passed 4 tests

A check of server-side resources used by Balfolk Tickets
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.0545.53 ▲2.94
Dashboard /wp-admin3.68 ▲0.1153.26 ▲1.75
Posts /wp-admin/edit.php3.73 ▲0.0554.15 ▲1.37
Add New Post /wp-admin/post-new.php6.20 ▲0.0591.39 ▲0.25
Media Library /wp-admin/upload.php3.54 ▲0.0539.46 ▼1.15

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 260 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Balfolk Tickets
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲4014.28 ▼0.281.75 ▲0.1144.08 ▲2.50
Dashboard /wp-admin2,204 ▲275.62 ▼0.08101.10 ▲13.8258.18 ▲15.89
Posts /wp-admin/edit.php2,113 ▲102.01 ▼0.0338.51 ▼0.6133.34 ▼4.49
Add New Post /wp-admin/post-new.php1,538 ▲1217.46 ▼0.03676.75 ▼29.2249.40 ▼11.92
Media Library /wp-admin/upload.php1,415 ▲184.24 ▼0.02100.33 ▼16.9848.78 ▼0.72

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

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 no errors were found, this is by no means 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
The following issues need your attention
  • 122× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'FontLib\\TrueType\\File' not found in wp-content/plugins/balfolk-tickets/dompdf/lib/php-font-lib/src/FontLib/OpenType/File.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Svg\\Tag\\AbstractTag' not found in wp-content/plugins/balfolk-tickets/dompdf/lib/php-svg-lib/src/Svg/Tag/Image.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/balfolk-tickets/tickets-template.php:176
    • > PHP Fatal error
      Uncaught Error: Class 'Svg\\Tag\\AbstractTag' not found in wp-content/plugins/balfolk-tickets/dompdf/lib/php-svg-lib/src/Svg/Document.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\FrameReflower\\AbstractFrameReflower' not found in wp-content/plugins/balfolk-tickets/dompdf/src/FrameReflower/TableRow.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\Renderer\\Block' not found in wp-content/plugins/balfolk-tickets/dompdf/src/Renderer/TableRowGroup.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'FontLib\\Table\\Table' not found in wp-content/plugins/balfolk-tickets/dompdf/lib/php-font-lib/src/FontLib/Table/Type/post.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\FrameDecorator\\AbstractFrameDecorator' not found in wp-content/plugins/balfolk-tickets/dompdf/src/FrameDecorator/TableRow.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\FrameDecorator\\AbstractFrameDecorator' not found in wp-content/plugins/balfolk-tickets/dompdf/src/FrameDecorator/Inline.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'FontLib\\Table\\Table' not found in wp-content/plugins/balfolk-tickets/dompdf/lib/php-font-lib/src/FontLib/Table/Type/loca.php:17

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)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
5 plugin tags: bal folk, ticketing, tickets, event, balfolk

balfolk-tickets/balfolk-tickets.php Passed 13 tests

The main file in "Balfolk Tickets" v. 1.3.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
45 characters long description:
WordPress ticketing plugin for balfolk events

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected33,942 lines of code in 190 files:
LanguageFilesBlank linesComment linesLines of code
PHP1698,16415,34132,797
CSS312744515
Markdown5860231
XML432191
JSON400115
YAML315452
JavaScript14024
HTML10017

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
These items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 652)
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity37.81
▷ Minimum class complexity1.00
▷ Maximum class complexity765.00
Average method complexity4.54
▷ Minimum method complexity1.00
▷ Maximum method complexity652.00
Code structure
Namespaces25
Interfaces2
Traits0
Classes162
▷ Abstract classes74.32%
▷ Concrete classes15595.68%
▷ Final classes00.00%
Methods1,763
▷ Static methods1317.43%
▷ Public methods1,48584.23%
▷ Protected methods21011.91%
▷ Private methods683.86%
Functions21
▷ Named functions523.81%
▷ Anonymous functions1676.19%
Constants158
▷ Global constants21.27%
▷ Class constants15698.73%
▷ Public constants156100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
dompdf/lib/res/broken_image.png0.60KB0.47KB▼ 22.33%