84% mstw-schedule-builder

Code Review | MSTW Schedule Builder

WordPress plugin MSTW Schedule Builder scored84%from 54 tests.

About plugin

  • Plugin page: mstw-schedule-bui...
  • Plugin version: 1.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5.1-5.8
  • WordPress version: 6.3.1
  • First release: Oct 24, 2020
  • Latest release: Oct 3, 2022
  • Number of updates: 8
  • Update frequency: every 89.0 days
  • Top authors: MarkODonnell (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /576 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
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.98ms] Passed 4 tests

A check of server-side resources used by MSTW Schedule Builder
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0032.33 ▼3.59
Dashboard /wp-admin3.31 ▲0.0045.47 ▼3.24
Posts /wp-admin/edit.php3.36 ▲0.0043.36 ▼3.57
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.42 ▼17.53
Media Library /wp-admin/upload.php3.23 ▲0.0036.86 ▲1.40

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

MSTW Schedule Builder: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.26 ▲0.051.65 ▼0.1944.82 ▲0.62
Dashboard /wp-admin2,195 ▲185.65 ▲0.0785.45 ▼7.7438.12 ▼2.22
Posts /wp-admin/edit.php2,100 ▲32.04 ▲0.0437.61 ▲2.8232.43 ▼6.30
Add New Post /wp-admin/post-new.php1,526 ▼023.67 ▲0.42599.10 ▼6.2065.24 ▲2.55
Media Library /wp-admin/upload.php1,397 ▼34.25 ▲0.0597.87 ▼9.1244.68 ▲2.04

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/mstw-schedule-builder/includes/mstw-sb-admin.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/mstw-schedule-builder/mstw-schedule-builder.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 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
7 plugin tags: sports, leagues, schedules, games, tournaments...

mstw-schedule-builder/mstw-schedule-builder.php 92% from 13 tests

The main PHP script in "MSTW Schedule Builder" version 1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("3.6" instead of "5.5.1")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin4,987 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP67991,3492,558
CSS363651,289
JavaScript52902101,140

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity68.00
▷ Minimum class complexity55.00
▷ Maximum class complexity81.00
Average method complexity3.79
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods48
▷ Static methods00.00%
▷ Public methods48100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions60
▷ Named functions60100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.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
11 PNG files occupy 0.24MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/lm-header-bkgd.png49.90KB0.30KB▼ 99.40%
css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png0.09KB0.14KB0.00%
images/mstw-logo-16x16.png51.45KB0.27KB▼ 99.47%
css/images/ui-icons_777620_256x240.png4.44KB4.17KB▼ 6.02%
images/mstw-admin-menu-icon.png51.45KB0.27KB▼ 99.47%