68% zencoder-video

Code Review | Zencoder Video

WordPress plugin Zencoder Video scored68%from 54 tests.

About plugin

  • Plugin page: zencoder-video
  • Plugin version: 0.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8.1
  • WordPress version: 6.3.1
  • First release: Feb 22, 2014
  • Latest release: Feb 22, 2014
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: normanyung (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,138 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.42ms] 75% from 4 tests

Server-side resources used by Zencoder Video
It is recommended to improve the following
  • CPU: Try to keep total CPU usage under 500.00ms (currently 714.81ms on /wp-admin/options-general.php?page=zcvideo)
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.45 ▼4.59
Dashboard /wp-admin3.35 ▲0.0544.45 ▼1.55
Posts /wp-admin/edit.php3.47 ▲0.1148.87 ▲0.53
Add New Post /wp-admin/post-new.php5.94 ▲0.0586.65 ▼8.06
Media Library /wp-admin/upload.php3.27 ▲0.0536.14 ▲2.65
Add New /wp-admin/post-new.php?post_type=zcvideo_video3.3043.40
Zencoder Videos /wp-admin/edit.php?post_type=zcvideo_video3.3241.87
Zencoder Video Options /wp-admin/options-general.php?page=zcvideo3.28714.81

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Zencoder Video
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲10113.62 ▼0.731.65 ▼0.2639.17 ▼4.02
Dashboard /wp-admin2,236 ▲455.79 ▼0.1197.93 ▼5.4440.01 ▲0.30
Posts /wp-admin/edit.php2,122 ▲302.04 ▲0.0340.24 ▼0.8334.49 ▼1.37
Add New Post /wp-admin/post-new.php1,556 ▲2323.18 ▼0.03577.89 ▼93.7351.71 ▼7.24
Media Library /wp-admin/upload.php1,421 ▲394.19 ▼0.0197.06 ▼2.9941.89 ▼5.88
Add New /wp-admin/post-new.php?post_type=zcvideo_video1,7093.6164.8037.46
Zencoder Videos /wp-admin/edit.php?post_type=zcvideo_video1,0742.1229.8529.38
Zencoder Video Options /wp-admin/options-general.php?page=zcvideo1,0022.0323.1234.37

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

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
These server-side errors were triggered
    • > GET request to /wp-admin/post-new.php?post_type=zcvideo_video
    • > Notice in wp-content/plugins/zencoder-video/posttype.php+55
    Undefined index: _zcvideo_job_id
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=zcvideo
    • > Notice in wp-content/plugins/zencoder-video/admin.php+70
    Undefined index: output_base
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=zcvideo
    • > Notice in wp-content/plugins/zencoder-video/admin.php+79
    Undefined index: output_public
    • > GET request to /wp-admin/options-general.php?page=zcvideo
    • > Notice in wp-content/plugins/zencoder-video/admin.php+87
    Undefined index: output_credentials
    • > GET request to /wp-admin/options-general.php?page=zcvideo
    • > Notice in wp-content/plugins/zencoder-video/admin.php+95
    Undefined index: output_formats
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=zcvideo
    • > Warning in wp-content/plugins/zencoder-video/admin.php+104
    array_search() expects parameter 2 to be array, null given
    • > GET request to /wp-admin/options-general.php?page=zcvideo
    • > Notice in wp-content/plugins/zencoder-video/admin.php+113
    Undefined index: output_maxres

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 20× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Zencoder_Object' not found in wp-content/plugins/zencoder-video/Services/Zencoder/Progress.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Zencoder_Object' not found in wp-content/plugins/zencoder-video/Services/Zencoder/Stream.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Zencoder_Object' not found in wp-content/plugins/zencoder-video/Services/Zencoder/Notification.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Zencoder_Object' not found in wp-content/plugins/zencoder-video/Services/Zencoder/Output.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Zencoder_Object' not found in wp-content/plugins/zencoder-video/Services/Zencoder/Account.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Services_Zencoder_HttpProxy' not found in wp-content/plugins/zencoder-video/Services/Zencoder/Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Zencoder_Base' not found in wp-content/plugins/zencoder-video/Services/Zencoder/Notifications.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Zencoder_Base' not found in wp-content/plugins/zencoder-video/Services/Zencoder/Jobs.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Zencoder_Object' not found in wp-content/plugins/zencoder-video/Services/Zencoder/Input.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/zencoder-video/zencodervideo.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% 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
6 plugin tags: self-hosted video, transcoder, zencoder, transcoding, videos...

zencoder-video/zencodervideo.php 85% from 13 tests

"Zencoder Video" version 0.1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("zencoder-video.php" instead of "zencodervideo.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 191 characters long)

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
These items require your attention
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/zencoder-video/Services/Zencoder/zencoder_ca_chain.crt
927 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP24143572921
CSS1006

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity4.86
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity2.93
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes20
▷ Abstract classes15.00%
▷ Concrete classes1995.00%
▷ Final classes00.00%
Methods46
▷ Static methods00.00%
▷ Public methods3882.61%
▷ Protected methods12.17%
▷ Private methods715.22%
Functions31
▷ Named functions31100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.22MB with 0.13MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png54.75KB20.77KB▼ 62.07%
assets/screenshot-3.png51.58KB22.09KB▼ 57.17%
assets/screenshot-1.png114.31KB43.72KB▼ 61.75%