84% playerjs

Code Review | PlayerJS

WordPress plugin PlayerJS scored84%from 54 tests.

About plugin

  • Plugin page: playerjs
  • Plugin version: 2.23
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3.1
  • WordPress version: 6.3.1
  • First release: Nov 22, 2018
  • Latest release: Oct 21, 2023
  • Number of updates: 28
  • Update frequency: every 65.3 days
  • Top authors: playerjs (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

700+ active /16,875 total downloads

Benchmarks

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

Server-side resources used by PlayerJS
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.56 ▲0.57
Dashboard /wp-admin3.37 ▲0.0247.21 ▼14.01
Posts /wp-admin/edit.php3.42 ▲0.0648.76 ▲1.87
Add New Post /wp-admin/post-new.php5.95 ▲0.0682.26 ▼10.23
Media Library /wp-admin/upload.php3.29 ▲0.0636.25 ▲2.23
PlayerJS /wp-admin/options-general.php?page=playerjs_com_admin3.2634.19

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

PlayerJS: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲4616.50 ▲2.2249.04 ▲47.2939.69 ▼0.28
Dashboard /wp-admin2,199 ▲185.61 ▼0.1089.27 ▼7.0138.38 ▼5.12
Posts /wp-admin/edit.php2,104 ▲42.08 ▲0.0739.33 ▲5.8535.80 ▲0.40
Add New Post /wp-admin/post-new.php1,540 ▲1418.22 ▼4.95613.39 ▼83.3870.46 ▲6.97
Media Library /wp-admin/upload.php1,398 ▼24.14 ▼0.0493.04 ▼3.9841.55 ▼6.01
PlayerJS /wp-admin/options-general.php?page=playerjs_com_admin8741.9924.4938.97

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/playerjs/admin/playerjs_com_admin.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
8 plugin tags: vimeo player, video player, playerjs, hls player, youtube player...

playerjs/playerjs.php Passed 13 tests

The main PHP file in "PlayerJS" ver. 2.23 adds more information about the plugin and also serves as the entry point for this plugin
100 characters long description:
Embed your created player in PlayerJS Builder and play HTML5 Video, Audio, HLS, DASH, YouTube, Vimeo

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected428 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP26918251
JavaScript2276131
CSS13046

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/playerjs.png7.19KB6.11KB▼ 14.99%
admin/x.png1.23KB0.34KB▼ 72.45%