84% boomtrain-tracker

Code Review | Boomtrain Tracker

WordPress plugin Boomtrain Tracker scored84%from 54 tests.

About plugin

  • Plugin page: boomtrain-tracker
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 6.3.1
  • First release: Sep 30, 2014
  • Latest release: Sep 30, 2014
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: nofearinc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /801 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.62ms] Passed 4 tests

Server-side resources used by Boomtrain Tracker
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.57 ▼6.04
Dashboard /wp-admin3.34 ▲0.0449.12 ▼6.79
Posts /wp-admin/edit.php3.45 ▲0.1047.89 ▼4.36
Add New Post /wp-admin/post-new.php5.92 ▲0.0484.36 ▼13.27
Media Library /wp-admin/upload.php3.26 ▲0.0435.30 ▲1.57
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins3.2732.82

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Boomtrain Tracker
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲9913.56 ▼0.771.71 ▼0.2543.25 ▼1.24
Dashboard /wp-admin2,251 ▲635.82 ▲0.70115.33 ▼3.3247.72 ▲2.63
Posts /wp-admin/edit.php2,142 ▲532.04 ▲0.0538.51 ▲1.6136.32 ▼0.34
Add New Post /wp-admin/post-new.php1,566 ▲2423.34 ▲4.97646.45 ▲16.0950.95 ▼4.72
Media Library /wp-admin/upload.php1,441 ▲534.30 ▲0.07101.21 ▲0.2146.56 ▲1.18
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins9342.0928.2925.02

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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
Please fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/boomtrain-tracker/inc/admin-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/boomtrain-tracker/boomtrain.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/boomtrain-tracker/lib/class-tgm-plugin-activation.php:161

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
4 plugin tags: reporting, stats, tracking, analytics

boomtrain-tracker/boomtrain.php 85% from 13 tests

The main file in "Boomtrain Tracker" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("boomtrain-tracker.php" instead of "boomtrain.php")

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
Good job! No executable or dangerous file extensions detected1,191 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP33898021,191

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity42.80
▷ Minimum class complexity8.00
▷ Maximum class complexity113.00
Average method complexity5.18
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods50
▷ Static methods12.00%
▷ Public methods4488.00%
▷ Protected methods612.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
There are no PNG files in this plugin