84% bg-btime

Code Review | Bg BTime

WordPress plugin Bg BTime scored84%from 54 tests.

About plugin

  • Plugin page: bg-btime
  • Plugin version: 2.4
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 8, 2017
  • Latest release: Nov 12, 2021
  • Number of updates: 10
  • Update frequency: every 176.6 days
  • Top authors: VBog (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /826 total downloads


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.01MB] [CPU: ▼14.61ms] Passed 4 tests

Server-side resources used by Bg BTime
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0152.19 ▲8.92
Dashboard /wp-admin3.31 ▲0.0148.71 ▼11.83
Posts /wp-admin/edit.php3.36 ▲0.0044.95 ▼47.52
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.43 ▼2.54
Media Library /wp-admin/upload.php3.23 ▲0.0040.40 ▲3.45

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for Bg BTime
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6414.71 ▲0.433.01 ▲1.0341.39 ▼9.33
Dashboard /wp-admin2,197 ▲165.62 ▼0.0489.83 ▼56.9937.83 ▼16.58
Posts /wp-admin/edit.php2,102 ▼12.00 ▲0.0240.69 ▼10.3938.37 ▼6.19
Add New Post /wp-admin/post-new.php1,542 ▲1123.05 ▼0.41673.85 ▼29.9257.83 ▲8.04
Media Library /wp-admin/upload.php1,399 ▼14.15 ▼0.06112.68 ▲2.6349.00 ▲0.19

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/bg-btime/bg_btime.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected


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
No tags were found

bg-btime/bg_btime.php 85% from 13 tests

The main PHP script in "Bg BTime" version 2.4 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: The principal plugin file should be the same as the plugin slug ("bg-btime.php" instead of "bg_btime.php")

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
Good job! No executable or dangerous file extensions detected457 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PO File16869156

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions7100.00%
▷ Anonymous functions00.00%
▷ Global constants1100.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
2 PNG files occupy 0.30MB with 0.18MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
btime/bclock.png290.38KB125.22KB▼ 56.88%
btime/hand.png21.68KB8.07KB▼ 62.79%