10% ooyala-video-browser

Code Review | Ooyala

WordPress plugin Ooyala scored10%from 54 tests.

About plugin

  • Plugin page: ooyala-video-browser
  • Plugin version: 3.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.9.2
  • WordPress version: 6.3.1
  • First release: Dec 13, 2010
  • Latest release: May 7, 2019
  • Number of updates: 93
  • Update frequency: every 33.0 days
  • Top authors: PeteMall (27.96%)dsearle (24.73%)bendoh (20.43%)ipiankov (11.83%)kalilsn (7.53%)

Code review

54 tests

User reviews

4 reviews

Install metrics

20+ active /17,980 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/ooyala-video-browser/ooyala.php+1076
    Array to string conversion

Server metrics [RAM: ▼1.32MB] [CPU: ▼54.12ms] Passed 4 tests

Analyzing server-side resources used by Ooyala
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.67 ▼0.799.61 ▼34.24
Dashboard /wp-admin2.69 ▼0.658.03 ▼55.29
Posts /wp-admin/edit.php2.69 ▼0.668.34 ▼38.60
Add New Post /wp-admin/post-new.php2.69 ▼3.198.93 ▼88.34
Media Library /wp-admin/upload.php2.69 ▼0.538.74 ▼25.88
Analytics Plugin Settings /wp-admin/admin.php?page=ooyala_analytics2.697.89
Account Settings /wp-admin/admin.php?page=ooyala_accounts2.6911.33
Video Player Settings /wp-admin/admin.php?page=ooyala_player2.697.70

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

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

Browser metrics Passed 4 tests

Ooyala: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲12813.68 ▼0.602.07 ▲0.0337.11 ▼9.13
Dashboard /wp-admin2,289 ▲864.88 ▲0.02103.63 ▼13.1339.38 ▼8.17
Posts /wp-admin/edit.php2,168 ▲681.99 ▼0.0640.13 ▲3.6133.98 ▼1.97
Add New Post /wp-admin/post-new.php1,641 ▲9617.79 ▼3.69682.14 ▲60.3140.17 ▼18.92
Media Library /wp-admin/upload.php1,532 ▲1324.27 ▲0.04106.90 ▲12.3348.62 ▲6.62
Analytics Plugin Settings /wp-admin/admin.php?page=ooyala_analytics1,8962.0236.1044.57
Account Settings /wp-admin/admin.php?page=ooyala_accounts9562.1025.4128.08
Video Player Settings /wp-admin/admin.php?page=ooyala_player1,3991.7929.7128.59

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/ooyala-video-browser/ooyala.php+1076
    Array to string conversion
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 288 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ooyala_player
    • > Notice in wp-content/plugins/ooyala-video-browser/ooyala.php+1076
    Array to string conversion
    • > GET request to /wp-admin/admin.php?page=ooyala_player
    • > Notice in wp-content/plugins/ooyala-video-browser/ooyala.php+717
    Undefined property: Ooyala::$special_ads
    • > GET request to /wp-admin/admin.php?page=ooyala_player
    • > Notice in wp-content/plugins/ooyala-video-browser/ooyala.php+717
    Trying to access array offset on value of type null
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ooyala_player
    • > Notice in wp-content/plugins/ooyala-video-browser/ooyala.php+795
    Undefined index: captionPosition

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
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ooyala-video-browser/ooyala.php:158
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/ooyala-video-browser/ooyala-templates.php:6

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)
No browser errors were detected

Optimizations

Plugin configuration 96% 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
3 plugin tags: video, media, ooyala

ooyala-video-browser/ooyala.php 92% from 13 tests

The main PHP script in "Ooyala" version 3.1.0 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("ooyala-video-browser.php" instead of "ooyala.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
Success! There were no dangerous files found in this plugin5,944 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript79401,5613,326
PHP23713041,866
CSS17230749
HTML1003

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity210.00
▷ Minimum class complexity210.00
▷ Maximum class complexity210.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods34
▷ Static methods25.88%
▷ Public methods3294.12%
▷ Protected methods00.00%
▷ Private methods25.88%
Functions5
▷ Named functions00.00%
▷ Anonymous functions5100.00%
Constants14
▷ Global constants00.00%
▷ Class constants14100.00%
▷ Public constants14100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/ooyala-logo-small.png4.96KB1.53KB▼ 69.21%
img/ooyala-title.png26.39KB10.17KB▼ 61.48%