76% vzaar-official-plugin

Code Review | vzaar official media manager

WordPress plugin vzaar official media manager scored 76% from 54 tests.

About plugin

  • Plugin page: vzaar-official-pl...
  • Plugin version: 1.7.13082015
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.4
  • WordPress version: 5.9.2
  • First release: Jan 4, 2013
  • Latest release: Aug 13, 2015
  • Number of updates: 45
  • Update frequency: every 21.6 days
  • Top authors: vzaardan (91.11%)vzaarlawrence (11.11%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 4,775 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.36MB] [CPU: ▼311.78ms] Passed 4 tests

Analyzing server-side resources used by vzaar official media manager
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /1.98 ▼1.544.21 ▼49.04
Dashboard /wp-admin3.48 ▲0.0734.18 ▲0.50
Posts /wp-admin/edit.php3.70 ▲0.0638.11 ▼13.11
Add New Post /wp-admin/post-new.php6.96 ▼0.0394.28 ▼1,185.47
Media Library /wp-admin/upload.php3.35 ▲0.0626.23 ▲1.88
Upload /wp-admin/admin.php?page=vzaar-official-plugin/upload.php3.4923.60
vzaar /wp-admin/admin.php?page=vzaar-official-plugin/dialogs/vzaarAPISettings.php3.3222.49
Videos /wp-admin/admin.php?page=vzaar-official-plugin/media.php3.5221.73

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 42 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

vzaar official media manager: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,837 ▲8315.76 ▼0.246.38 ▲0.632.07 ▼0.32
Dashboard /wp-admin2,932 ▲746.17 ▼0.01118.49 ▼14.20185.14 ▲27.16
Posts /wp-admin/edit.php2,696 ▲53.13 ▼0.1063.58 ▲1.08139.90 ▼0.58
Add New Post /wp-admin/post-new.php1,783 ▲11722.03 ▲1.65409.46 ▼13.78175.85 ▲21.54
Media Library /wp-admin/upload.php1,734 ▲365.55 ▲0.00126.12 ▼8.02201.40 ▲13.75
Upload /wp-admin/admin.php?page=vzaar-official-plugin/upload.php1,1132.3953.34110.54
vzaar /wp-admin/admin.php?page=vzaar-official-plugin/dialogs/vzaarAPISettings.php1,0812.5353.47100.40
Videos /wp-admin/admin.php?page=vzaar-official-plugin/media.php1,2142.8764.37132.12

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/media.php
    • > Deprecated in wp-content/plugins/vzaar-official-plugin/vzaar/Vzaar.php+386
    Methods with the same name as their class will not be constructors in a future version of PHP; XMLToArray has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/media.php
    • > Deprecated in wp-content/plugins/vzaar-official-plugin/vzaar/AccountType.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; CostType has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/media.php
    • > Deprecated in wp-content/plugins/vzaar-official-plugin/vzaar/AccountType.php+17
    Methods with the same name as their class will not be constructors in a future version of PHP; RightsType has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/media.php
    • > Deprecated in wp-content/plugins/vzaar-official-plugin/vzaar/AccountType.php+26
    Methods with the same name as their class will not be constructors in a future version of PHP; AccountType has a deprecated constructor
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/media.php
    • > Notice in wp-content/plugins/vzaar-official-plugin/media.php+7
    Undefined index: HTTPS
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/media.php
    • > Notice in wp-content/plugins/vzaar-official-plugin/vzaar/OAuth.php+352
    Undefined index: port
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/upload.php
    • > Warning in wp-content/plugins/vzaar-official-plugin/vzaar/Vzaar.php+472
    sizeof(): Parameter must be an array or an object that implements Countable
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/upload.php
    • > Notice in wp-content/plugins/vzaar-official-plugin/upload.php+53
    Undefined index: bucket
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/upload.php
    • > Notice in wp-content/plugins/vzaar-official-plugin/upload.php+52
    Undefined index: acl
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/upload.php
    • > Notice in wp-content/plugins/vzaar-official-plugin/upload.php+54
    Undefined index: policy
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/upload.php
    • > Notice in wp-content/plugins/vzaar-official-plugin/upload.php+55
    Undefined index: accesskeyid
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/upload.php
    • > Notice in wp-content/plugins/vzaar-official-plugin/upload.php+56
    Undefined index: signature
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/upload.php
    • > Notice in wp-content/plugins/vzaar-official-plugin/upload.php+58
    Undefined index: guid
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/upload.php
    • > Notice in wp-content/plugins/vzaar-official-plugin/upload.php+59
    Undefined index: key
  • 30 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/media.php
    • > Notice in wp-content/plugins/vzaar-official-plugin/vzaar/VideoList.php+45
    Undefined offset: 0
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/media.php
    • > Notice in wp-content/plugins/vzaar-official-plugin/vzaar/VideoList.php+30
    Trying to get property 'duration' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/media.php
    • > Notice in wp-content/plugins/vzaar-official-plugin/vzaar/VideoList.php+31
    Trying to get property 'play_count' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/media.php
    • > Notice in wp-content/plugins/vzaar-official-plugin/vzaar/VideoList.php+32
    Trying to get property 'title' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/media.php
    • > Notice in wp-content/plugins/vzaar-official-plugin/vzaar/VideoList.php+33
    Trying to get property 'url' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/media.php
    • > Notice in wp-content/plugins/vzaar-official-plugin/vzaar/VideoList.php+34
    Trying to get property 'created_at' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/media.php
    • > Notice in wp-content/plugins/vzaar-official-plugin/vzaar/VideoList.php+35
    Trying to get property 'version' of non-object
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/media.php
    • > Notice in wp-content/plugins/vzaar-official-plugin/vzaar/VideoList.php+40
    Trying to get property 'user' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/media.php
    • > Notice in wp-content/plugins/vzaar-official-plugin/vzaar/VideoList.php+37
    Trying to get property 'author_account' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/media.php
    • > Notice in wp-content/plugins/vzaar-official-plugin/vzaar/VideoList.php+38
    Trying to get property 'author_name' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/media.php
    • > Notice in wp-content/plugins/vzaar-official-plugin/vzaar/VideoList.php+39
    Trying to get property 'author_url' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/media.php
    • > Notice in wp-content/plugins/vzaar-official-plugin/vzaar/VideoList.php+40
    Trying to get property 'video_count' of non-object
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/media.php
    • > Notice in wp-content/plugins/vzaar-official-plugin/vzaar/VideoList.php+45
    Trying to get property 'id' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/media.php
    • > Notice in wp-content/plugins/vzaar-official-plugin/vzaar/VideoList.php+42
    Trying to get property 'thumbnail' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/media.php
    • > Notice in wp-content/plugins/vzaar-official-plugin/vzaar/VideoList.php+43
    Trying to get property 'width' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/media.php
    • > Notice in wp-content/plugins/vzaar-official-plugin/vzaar/VideoList.php+44
    Trying to get property 'height' of non-object
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/media.php
    • > Notice in wp-content/plugins/vzaar-official-plugin/media.php+87
    Trying to get property 'description' of non-object
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/media.php
    • > Warning in wp-content/plugins/vzaar-official-plugin/media.php+87
    Creating default object from empty value
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/media.php
    • > Notice in wp-content/plugins/vzaar-official-plugin/media.php+274
    Undefined property: stdClass::$videoStatus
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/media.php
    • > Notice in wp-content/plugins/vzaar-official-plugin/media.php+257
    Undefined property: stdClass::$height
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/media.php
    • > Notice in wp-content/plugins/vzaar-official-plugin/media.php+258
    Undefined property: stdClass::$width
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/media.php
    • > Notice in wp-content/plugins/vzaar-official-plugin/media.php+263
    Undefined property: stdClass::$html
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/media.php
    • > Notice in wp-content/plugins/vzaar-official-plugin/media.php+267
    Undefined property: stdClass::$title

SRP 0% 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
Almost there! Just fix the following items
  • 5× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/vzaar-official-plugin/vzaarAPI.php
    • > /wp-content/plugins/vzaar-official-plugin/s3Upload/signature.php
    • > /wp-content/plugins/vzaar-official-plugin/s3Upload/index.php
    • > /wp-content/plugins/vzaar-official-plugin/vzaar/index.php
    • > /wp-content/plugins/vzaar-official-plugin/s3Upload/saveRegs.php
  • 40× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      session_id(): Cannot change session id when session is active in wp-content/plugins/vzaar-official-plugin/s3Upload/processVideo.php on line 3
    • > PHP Warning
      session_id(): Cannot change session id when session is active in wp-content/plugins/vzaar-official-plugin/s3Upload/index.php on line 3
    • > PHP Warning
      require_once(../wp-includes/cache.php): failed to open stream: No such file or directory in wp-content/plugins/vzaar-official-plugin/dialogs/storeSettings.php on line 2
    • > PHP Warning
      mysqli::close(): Couldn't fetch mysqli in wp-content/plugins/vzaar-official-plugin/s3Upload/saveRegs.php on line 26
    • > PHP Notice
      Undefined index: vtitle in wp-content/plugins/vzaar-official-plugin/s3Upload/index.php on line 58
    • > PHP Warning
      session_id(): Cannot change session id when session is active in wp-content/plugins/vzaar-official-plugin/s3Upload/saveRegs.php on line 3
    • > PHP Notice
      Undefined index: vzaarId in wp-content/plugins/vzaar-official-plugin/s3Upload/saveRegs.php on line 16
    • > PHP Warning
      mysqli::__construct(): (HY000/1045): Access denied for user 'fitioze_mshare'@'localhost' (using password: YES) in wp-content/plugins/vzaar-official-plugin/s3Upload/index.php on line 15
    • > PHP Warning
      mysqli::query(): Couldn't fetch mysqli in wp-content/plugins/vzaar-official-plugin/s3Upload/saveRegs.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/vzaar-official-plugin/dialogs/vzaarAPISettings.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/media.php
    • > Javascript (severe) in unknown
    /wp-content/plugins/vzaar-official-plugin/js/jquery.corner.js 26:29 Uncaught TypeError: Cannot read properties of undefined (reading 'msie')
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/media.php
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2 1:31592 "jQuery.Deferred exception: jQuery(...).corner is not a function" "TypeError: jQuery(...).corner is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/admin.php?page=vzaar-official-plugin%2Fmedia.php:358:34)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:30340)" undefined
    • > GET request to /wp-admin/admin.php?page=vzaar-official-plugin/media.php
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2 1:31702 Uncaught TypeError: jQuery(...).corner is not a function

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Contributors: No valid plugin tags found
  • Donate link: Invalid URI ("")
  • Contributors: Plugin contributors field is missing
The official readme.txt might help

vzaar-official-plugin/vzaarAPI.php 85% from 13 tests

"vzaar official media manager" version 1.7.13082015's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("vzaar-official-plugin.php" instead of "vzaarAPI.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 503 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected3,872 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP225035102,334
JavaScript23832911
XML1080627

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity6.17
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.26
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes28
▷ Abstract classes00.00%
▷ Concrete classes28100.00%
▷ Final classes00.00%
Methods127
▷ Static methods3225.20%
▷ Public methods11691.34%
▷ Protected methods21.57%
▷ Private methods97.09%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants24
▷ Global constants00.00%
▷ Class constants24100.00%
▷ Public constants24100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
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/audio_only.png11.21KB5.48KB▼ 51.11%
images/icon.png4.15KB1.28KB▼ 69.26%