94% simple-baseball-scoreboard

Code Review | Simple Baseball Scoreboard

WordPress plugin Simple Baseball Scoreboard scored 94% from 54 tests.

About plugin

  • Plugin page: simple-baseball-s...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8.1-5.6
  • WordPress version: 5.8.1
  • First release: Sep 4, 2017
  • Latest release: Feb 2, 2021
  • Number of updates: 16
  • Update frequency: every 77.9 days
  • Top authors: dogrow (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 1,006 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

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

An overview of server-side resources used by Simple Baseball Scoreboard
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.1636.06 ▲14.87
Dashboard /wp-admin3.12 ▲0.0647.02 ▲2.10
Posts /wp-admin/edit.php3.17 ▲0.0641.66 ▼5.31
Add New Post /wp-admin/post-new.php5.47 ▲0.0485.05 ▼560.90
Media Library /wp-admin/upload.php3.06 ▲0.0532.76 ▼2.39
Simple BBScoreboard /wp-admin/options-general.php?page=simple-baseball-scoreboard/ytmr_simple_baseball_scoreboard.php3.0328.81

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 1 new option
New WordPress options
YTMRBBScoreBoard

Browser metrics Passed 4 tests

A check of browser resources used by Simple Baseball Scoreboard
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,693 ▲9815.98 ▲0.478.38 ▼0.6543.55 ▼4.34
Dashboard /wp-admin2,978 ▲475.91 ▼0.13136.03 ▼1.08114.81 ▲6.35
Posts /wp-admin/edit.php2,750 ▲112.72 ▲0.0264.86 ▼3.0491.27 ▼8.00
Add New Post /wp-admin/post-new.php1,880 ▲20819.12 ▲0.40358.52 ▼0.09113.10 ▲8.88
Media Library /wp-admin/upload.php1,821 ▲115.05 ▲0.03155.18 ▲10.68113.50 ▲2.94
Simple BBScoreboard /wp-admin/options-general.php?page=simple-baseball-scoreboard/ytmr_simple_baseball_scoreboard.php1,3092.4652.8288.99

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-baseball-scoreboard/ytmr_simple_baseball_scoreboard.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Donate link: Invalid URI found ("")
The official readme.txt might help

simple-baseball-scoreboard/ytmr_simple_baseball_scoreboard.php 92% from 13 tests

The principal PHP file in "Simple Baseball Scoreboard" v. 1.3 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("simple-baseball-scoreboard.php" instead of "ytmr_simple_baseball_scoreboard.php")

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
Success! There were no dangerous files found in this plugin224 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1249203
JavaScript10021

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity1.91
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected