10% bridge-tournament

Code Review | Bridge Tournament

WordPress plugin Bridge Tournament scored10%from 54 tests.

About plugin

  • Plugin page: bridge-tournament
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8
  • WordPress version: 6.3.1
  • First release: Jan 25, 2014
  • Latest release: Jan 25, 2014
  • Number of updates: 2
  • Update frequency: every 2.5 days
  • Top authors: Frederic Hantrais (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,040 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • The plugin cannot be installed
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.

Server metrics [RAM: ▲0.34MB] [CPU: ▼5.31ms] Passed 4 tests

Analyzing server-side resources used by Bridge Tournament
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3741.22 ▲0.53
Dashboard /wp-admin3.69 ▲0.3450.47 ▼17.58
Posts /wp-admin/edit.php3.74 ▲0.3854.09 ▲4.47
Add New Post /wp-admin/post-new.php6.21 ▲0.3291.26 ▼8.67
Media Library /wp-admin/upload.php3.55 ▲0.3244.74 ▲7.40
New Tournament /wp-admin/admin.php?page=create_tournament3.5237.45
Players list /wp-admin/tools.php?page=my-custom-submenu-page3.4936.46
New Player /wp-admin/admin.php?page=add_player3.5334.32
BT Options /wp-admin/admin.php?page=bt-menu-options3.5236.41

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 39 new files
Database: 4 new tables, 9 new options
New tables
wp_bt_player
wp_bt_tournament
wp_bt_partners
wp_bt_registration
New WordPress options
bt_remove_tables
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
bt_admin_privileges
bt_join_message

Browser metrics Passed 4 tests

Bridge Tournament: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,963 ▲20213.55 ▼0.739.73 ▲8.0641.26 ▼0.02
Dashboard /wp-admin2,255 ▲785.65 ▼0.0185.79 ▼8.5366.48 ▲23.76
Posts /wp-admin/edit.php2,157 ▲542.06 ▲0.1134.53 ▼5.8334.47 ▼2.46
Add New Post /wp-admin/post-new.php1,575 ▲4722.98 ▼0.21679.70 ▼4.9344.49 ▼6.32
Media Library /wp-admin/upload.php1,454 ▲574.27 ▲0.09109.86 ▲2.9790.40 ▲45.62
New Tournament /wp-admin/admin.php?page=create_tournament9351.8325.6434.77
Players list /wp-admin/tools.php?page=my-custom-submenu-page8371.7423.7928.10
New Player /wp-admin/admin.php?page=add_player8851.7623.8926.39
BT Options /wp-admin/admin.php?page=bt-menu-options1,0131.7824.5842.31

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/tools.php?page=my-custom-submenu-page
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'custom_player_display' not found or invalid function name

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/bridge-tournament/uninstall.php
    • > /wp-content/plugins/bridge-tournament/templates/bt-error.php
  • 22× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/bridge-tournament/templates/past-tournaments.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function site_url() in wp-content/plugins/bridge-tournament/templates/results-display.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/bridge-tournament/templates/bt-page-template.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function site_url() in wp-content/plugins/bridge-tournament/templates/tournament-add.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function site_url() in wp-content/plugins/bridge-tournament/templates/results-update.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/bridge-tournament/templates/tournament_admin_view.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/bridge-tournament/templates/available.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function site_url() in wp-content/plugins/bridge-tournament/templates/player-contact-form.php:12
    • > PHP Notice
      Undefined variable: error_html in wp-content/plugins/bridge-tournament/templates/bt-error.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/bridge-tournament/templates/player-list.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Plugin welcome page), #2 (Tournament creation page), #3 (Result display)
Please take inspiration from this readme.txt

bridge-tournament/bridge-tournament.php Passed 13 tests

The main file in "Bridge Tournament" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
93 characters long description:
This plugin is deisgned to help bridge tournament organizers to manage games and tournaments.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected2,797 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP274697872,389
PO File1150232312
CSS23196

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity37.00
▷ Minimum class complexity17.00
▷ Maximum class complexity72.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods89
▷ Static methods22.25%
▷ Public methods89100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions38
▷ Named functions38100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.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
4 compressed PNG files occupy 0.00MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/bt-icon-32.png0.96KB0.71KB▼ 25.99%
img/bt-icon-16.png0.72KB0.82KB0.00%
img/bt-icon.png0.54KB0.66KB0.00%
img/bt-icon-base.png0.53KB0.66KB0.00%