79% mstw-bracket-builder

Code Review | MSTW Bracket Builder

WordPress plugin MSTW Bracket Builder scored79%from 54 tests.

About plugin

  • Plugin page: mstw-bracket-builder
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.0.3
  • WordPress version: 6.3.1
  • First release: Apr 18, 2016
  • Latest release: Dec 10, 2022
  • Number of updates: 29
  • Update frequency: every 83.8 days
  • Top authors: MarkODonnell (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /6,523 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

Analyzing server-side resources used by MSTW Bracket Builder
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.06 ▼4.34
Dashboard /wp-admin3.36 ▲0.0546.36 ▼8.53
Posts /wp-admin/edit.php3.41 ▲0.0549.83 ▲0.71
Add New Post /wp-admin/post-new.php5.94 ▲0.0581.18 ▼14.04
Media Library /wp-admin/upload.php3.28 ▲0.0536.70 ▲2.29
Bracket Builder /wp-admin/admin.php?page=mstw-bb-bracket-builder3.2532.44
Tournaments /wp-admin/edit.php?post_type=mstw_bb_tourney3.3340.41
Edit Tournament /wp-admin/admin.php?page=mstw-bb-edit-tournament3.2433.47

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

MSTW Bracket Builder: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲9513.20 ▼1.431.78 ▼0.3042.72 ▼1.37
Dashboard /wp-admin2,234 ▲434.87 ▼1.0396.29 ▼9.2677.58 ▲34.88
Posts /wp-admin/edit.php2,123 ▲341.97 ▼0.0139.33 ▲2.0233.02 ▼1.93
Add New Post /wp-admin/post-new.php1,691 ▲16322.54 ▼0.82673.23 ▼11.1954.31 ▲2.70
Media Library /wp-admin/upload.php1,419 ▲284.13 ▼0.09100.31 ▲0.9945.11 ▲4.33
Bracket Builder /wp-admin/admin.php?page=mstw-bb-bracket-builder8662.0324.1329.69
Tournaments /wp-admin/edit.php?post_type=mstw_bb_tourney1,1162.2034.5332.04
Edit Tournament /wp-admin/admin.php?page=mstw-bb-edit-tournament9142.2227.0425.39

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=mstw-bb-edit-tournament
    • > Notice in wp-content/plugins/mstw-bracket-builder/includes/mstw-bb-bracket-builder-class.php+197
    Trying to get property 'ID' of non-object

SRP 50% 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
Please fix the following
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mstw-bracket-builder/mstw-bracket-builder.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/mstw-bracket-builder/includes/mstw-bb-admin.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/mstw-bracket-builder/includes/mstw-bb-tourney-table-class.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mstw-bracket-builder/includes/mstw-bb-tourney-cpt-admin.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/mstw-bracket-builder/includes/mstw-bb-tourney-bracket-class.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/mstw-bracket-builder/templates/single-tourney.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
9 plugin tags: knockout round, sports tournament, tournament manager, bracket, ncaa basketball tournament...

mstw-bracket-builder/mstw-bracket-builder.php Passed 13 tests

The main file in "MSTW Bracket Builder" v. 1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
45 characters long description:
Builds brackets for 4 to 64 team tournaments.

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
Success! There were no dangerous files found in this plugin4,313 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP108771,3821,841
CSS41511311,508
JavaScript222480964

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity32.75
▷ Minimum class complexity11.00
▷ Maximum class complexity67.00
Average method complexity3.02
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods63
▷ Static methods00.00%
▷ Public methods63100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions36
▷ Named functions36100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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.15MB with 0.15MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/mstw-logo-16x16.png51.45KB0.27KB▼ 99.47%
images/mstw-logo-32x32.png52.27KB0.48KB▼ 99.09%
images/mstw-admin-menu-icon.png51.45KB0.27KB▼ 99.47%