78% bitmovin-video

Code Review | Bitmovin Wordpress Plugin

WordPress plugin Bitmovin Wordpress Plugin scored 78% from 54 tests.

About plugin

  • Plugin page: bitmovin-video
  • Plugin version: 2.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.3-4.9.5
  • WordPress version: 5.9.2
  • First release: Jul 27, 2016
  • Latest release: May 9, 2018
  • Number of updates: 42
  • Update frequency: every 18.9 days
  • Top authors: bitmovin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 2,759 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.08MB] [CPU: ▼294.59ms] Passed 4 tests

An overview of server-side resources used by Bitmovin Wordpress Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.29 ▲0.5462.44 ▲30.45
Dashboard /wp-admin4.13 ▲0.1039.59 ▲2.01
Posts /wp-admin/edit.php4.41 ▲0.0951.87 ▲8.10
Add New Post /wp-admin/post-new.php7.66 ▲0.0795.75 ▼1,192.17
Media Library /wp-admin/upload.php4.07 ▲0.0933.21 ▲3.71
All Videos /wp-admin/edit.php?post_type=bitmovin_player4.1154.27
Add New Video /wp-admin/post-new.php?post_type=bitmovin_player4.2846.02

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Bitmovin Wordpress Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,829 ▲7515.86 ▲0.665.60 ▼0.952.22 ▼0.83
Dashboard /wp-admin2,953 ▲926.25 ▲0.06123.47 ▼25.91181.59 ▲18.18
Posts /wp-admin/edit.php2,750 ▲593.19 ▼0.0468.06 ▲3.58149.44 ▲8.53
Add New Post /wp-admin/post-new.php1,680 ▲1421.58 ▲1.16457.99 ▲11.82182.54 ▼15.50
Media Library /wp-admin/upload.php1,754 ▲605.70 ▲0.24132.58 ▼26.50217.71 ▲6.70
All Videos /wp-admin/edit.php?post_type=bitmovin_player1,4453.1372.25130.07
Add New Video /wp-admin/post-new.php?post_type=bitmovin_player2,2474.2784.43226.16

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
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-includes/class-wp-hook.php+307
    call_user_func_array() expects parameter 1 to be a valid callback, function 'bitmovin_plugin_deactivation' not found or invalid function name

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/bitmovin-video/bitmovin.php:12

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/edit.php?post_type=bitmovin_player
    • > Network (severe)
    https://api.bitmovin.com/v1/player/channels/undefined/versions - Failed to load resource: the server responded with a status of 403 ()
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=bitmovin_player
    • > Network (severe)
    https://api.bitmovin.com/v1/player/licenses - Failed to load resource: the server responded with a status of 403 ()
    • > GET request to /wp-admin/post-new.php?post_type=bitmovin_player
    • > Network (severe)
    https://api.bitmovin.com/v1/player/channels/stable/versions - Failed to load resource: the server responded with a status of 403 ()

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4, #5, #6, #7, #8 in bitmovin-video/assets to your readme.txt
The official readme.txt is a good inspiration

bitmovin-video/bitmovin.php 92% from 13 tests

The principal PHP file in "Bitmovin Wordpress Plugin" v. 2.0.3 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("bitmovin-video.php" instead of "bitmovin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin477 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP18413326
JavaScript1290102
CSS111249

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.09
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
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions25
▷ Named functions25100.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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/bitlogo.png1.07KB0.37KB▼ 65.84%
images/info.png20.53KB10.94KB▼ 46.71%