84% bktsk-live-scheduler

Code Review | BKTSK Live Scheduler

WordPress plugin BKTSK Live Scheduler scored 84% from 54 tests.

About plugin

  • Plugin page: bktsk-live-scheduler
  • Plugin version: 0.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.2.3
  • WordPress version: 6.3.1
  • First release: Sep 20, 2019
  • Latest release: Sep 27, 2019
  • Number of updates: 21
  • Update frequency: every 0.4 days
  • Top authors: sasagar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 728 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by BKTSK Live Scheduler
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.58 ▼0.51
Dashboard /wp-admin3.31 ▲0.0043.06 ▼2.34
Posts /wp-admin/edit.php3.36 ▲0.0046.84 ▼3.69
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.53 ▼9.33
Media Library /wp-admin/upload.php3.23 ▲0.0035.22 ▲0.70

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 39 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for BKTSK Live Scheduler
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.74 ▲0.351.78 ▼0.2245.31 ▼4.23
Dashboard /wp-admin2,206 ▲215.90 ▲0.03103.74 ▼16.1442.86 ▼1.95
Posts /wp-admin/edit.php2,089 ▼02.13 ▲0.1340.93 ▲2.9038.73 ▲8.75
Add New Post /wp-admin/post-new.php1,547 ▲3318.48 ▲0.88620.46 ▼67.2770.89 ▲18.06
Media Library /wp-admin/upload.php1,388 ▼04.26 ▼0.0695.54 ▼8.4340.94 ▼2.56

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/bktsk-live-scheduler/lib/class-bktskytscheduleradminpage.php:399
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bktsk-live-scheduler/bktsk-yt-live-scheduler.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bktsk-live-scheduler/lib/add-taxonomy.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bktsk-live-scheduler/lib/add-post-type.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/bktsk-live-scheduler/lib/class-bktskytschedulershortcode.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/bktsk-live-scheduler/lib/make-ics.php:10

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 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: schedule, live, youtube, calendar

bktsk-live-scheduler/bktsk-yt-live-scheduler.php 92% from 13 tests

The main PHP script in "BKTSK Live Scheduler" version 0.4.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("bktsk-live-scheduler.php" instead of "bktsk-yt-live-scheduler.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin6,536 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
JSON3004,875
PHP72541601,302
PO File17983214
Sass117084
JavaScript5121756
CSS54125

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity35.50
▷ Minimum class complexity23.00
▷ Maximum class complexity48.00
Average method complexity2.97
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods35
▷ Static methods00.00%
▷ Public methods2365.71%
▷ Protected methods00.00%
▷ Private methods1234.29%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
6 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
style/images/ui-icons_ffffff_256x240.png6.17KB4.18KB▼ 32.17%
style/images/ui-icons_444444_256x240.png6.84KB4.18KB▼ 38.90%
style/images/ui-icons_cc0000_256x240.png4.52KB4.18KB▼ 7.56%
style/images/ui-icons_555555_256x240.png6.91KB4.18KB▼ 39.47%
style/images/ui-icons_777777_256x240.png6.85KB4.18KB▼ 38.94%