68% presto-player

Code Review | The Ultimate Video Player For WordPress - by Presto Player

WordPress plugin The Ultimate Video Player For WordPress - by Presto Player scored68%from 54 tests.

About plugin

  • Plugin page: presto-player
  • Plugin version: 2.0.11
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.4
  • WordPress version: 6.3.1
  • First release: Feb 15, 2021
  • Latest release: Nov 12, 2023
  • Number of updates: 219
  • Update frequency: every 4.6 days
  • Top authors: 2winfactor (89.04%)patilvikasj (11.42%)

Code review

54 tests

User reviews

221 reviews

Install metrics

90,000+ active /1,349,340 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.90MB] [CPU: ▲10.47ms] Passed 4 tests

Server-side resources used by The Ultimate Video Player For WordPress - by Presto Player
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /5.36 ▲1.8954.59 ▲14.79
Dashboard /wp-admin5.24 ▲1.9360.50 ▲10.35
Posts /wp-admin/edit.php5.29 ▲1.9362.43 ▲15.07
Add New Post /wp-admin/post-new.php8.23 ▲2.3499.00 ▲1.66
Media Library /wp-admin/upload.php5.09 ▲1.8649.79 ▲16.32
Media Hub /wp-admin/edit.php?post_type=pp_video_block5.1453.91
Settings /wp-admin/edit.php?post_type=pp_video_block&page=presto-player-settings5.1249.31
Analytics Pro /wp-admin/edit.php?post_type=pp_video_block&page=presto-analytics5.1147.79

Server storage [IO: ▲6.72MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 1,260 new files
Database: 6 new tables, 14 new options
New tables
wp_presto_player_email_collection
wp_presto_player_audio_presets
wp_presto_player_webhooks
wp_presto_player_videos
wp_presto_player_visits
wp_presto_player_presets
New WordPress options
presto_player_videos_database_version
presto_player_audio_presets_database_version
presto_player_email_collection_database_version
can_compress_scripts
theysaidso_admin_options
presto_player_webhooks_database_version
widget_theysaidso_widget
presto_player_visits_database_version
presto_audio_preset_seed_version
widget_recent-comments
...

Browser metrics Passed 4 tests

The Ultimate Video Player For WordPress - by Presto Player: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,994 ▲24713.62 ▼0.7310.28 ▲8.4838.15 ▼5.57
Dashboard /wp-admin2,246 ▲695.55 ▼0.0992.77 ▲2.6774.65 ▲31.96
Posts /wp-admin/edit.php2,151 ▲511.99 ▲0.0533.15 ▼6.5232.08 ▼3.25
Add New Post /wp-admin/post-new.php6,327 ▲4,80025.64 ▲2.501,112.77 ▲434.1777.22 ▲22.28
Media Library /wp-admin/upload.php1,448 ▲454.17 ▼0.02108.25 ▲5.6080.10 ▲33.98
Media Hub /wp-admin/edit.php?post_type=pp_video_block1,1751.9042.6033.18
Settings /wp-admin/edit.php?post_type=pp_video_block&page=presto-player-settings1,48611.76362.20128.37
Analytics Pro /wp-admin/edit.php?post_type=pp_video_block&page=presto-analytics1,4239.15130.2097.60

Uninstaller [IO: ▲0.01MB] [DB: ▲0.01MB] 50% 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
  • The plugin did not uninstall successfully, leaving 6 tables in the database
    • wp_presto_player_webhooks
    • wp_presto_player_videos
    • wp_presto_player_presets
    • wp_presto_player_visits
    • wp_presto_player_audio_presets
    • wp_presto_player_email_collection
  • Zombie WordPress options were found after uninstall: 14 options
    • presto_preset_seed_version
    • widget_theysaidso_widget
    • widget_recent-comments
    • presto_player_presets_database_version
    • presto_player_audio_presets_database_version
    • theysaidso_admin_options
    • can_compress_scripts
    • presto_player_videos_database_version
    • presto_player_email_collection_database_version
    • presto_player_visits_database_version
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/presto-player/templates/fallback.php
  • 157× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/presto-player/templates/parts/captions.php on line 1
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/presto-player/vendor/mundschenk-at/check-wp-requirements/tests/class-testcase.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/presto-player/vendor/composer/installers/src/Composer/Installers/SMFInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Settings_Controller' not found in wp-content/plugins/presto-player/inc/Services/API/RestSettingsController.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'DiceTest' not found in wp-content/plugins/presto-player/vendor/level-2/dice/tests/NamedInstancesTest.php:7
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/presto-player/templates/parts/logo.php on line 1
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/presto-player/vendor/composer/installers/src/Composer/Installers/KnownInstaller.php:5
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/presto-player/templates/parts/captions.php on line 1
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/presto-player/vendor/composer/installers/src/Composer/Installers/StarbugInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'PrestoPlayer\\Models\\ModelInterface' not found in wp-content/plugins/presto-player/inc/Models/Model.php:11

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
9 plugin tags: audio, learndash, video, lms, lifterlms...

presto-player/presto-player.php 85% from 13 tests

This is the main PHP file of "The Ultimate Video Player For WordPress - by Presto Player" version 2.0.11, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Domain Path: The domain path should use only dashes and lowercase characters ("languages")
  • Domain Path: The domain path must begin with a forward slash character ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected52,041 lines of code in 1,219 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4601,51695419,428
PHP2633,2604,81616,032
SVG323104,614
TypeScript86351,1703,747
CSS35190373,500
JSON23402,293
Sass14164141,256
Markdown43110632
JSX33941299
YAML54431192
XML34148

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity5.07
▷ Minimum class complexity1.00
▷ Maximum class complexity104.00
Average method complexity2.28
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces33
Interfaces10
Traits1
Classes290
▷ Abstract classes41.38%
▷ Concrete classes28698.62%
▷ Final classes00.00%
Methods968
▷ Static methods11311.67%
▷ Public methods83486.16%
▷ Protected methods838.57%
▷ Private methods515.27%
Functions46
▷ Named functions510.87%
▷ Anonymous functions4189.13%
Constants17
▷ Global constants529.41%
▷ Class constants1270.59%
▷ Public constants1191.67%

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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/presto-player-icon-color.png3.08KB3.08KB0.03%