10% wideo

Code Review | WIDEO视频播放器

WordPress plugin WIDEO视频播放器 scored10%from 54 tests.

About plugin

  • Plugin page: wideo
  • Plugin version: 2.0.3
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 10, 2019
  • Latest release: Jan 29, 2023
  • Number of updates: 44
  • Update frequency: every 26.9 days
  • Top authors: upcwayne (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

300+ active /7,531 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/wideo/class.wideo.php+236
    Use of undefined constant indate - assumed 'indate' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.87ms] Passed 4 tests

Analyzing server-side resources used by WIDEO视频播放器
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.49 ▼1.97
Dashboard /wp-admin3.33 ▲0.0345.16 ▼1.39
Posts /wp-admin/edit.php3.38 ▲0.0346.86 ▼2.34
Add New Post /wp-admin/post-new.php5.93 ▲0.0590.89 ▲7.78
Media Library /wp-admin/upload.php3.25 ▲0.0334.15 ▼1.77
关于 /wp-admin/admin.php?page=wideo-about3.2430.81
WIDEO 播放器 /wp-admin/admin.php?page=wideo3.2829.84

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WIDEO视频播放器
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲8013.53 ▼0.851.71 ▼0.0939.00 ▼4.34
Dashboard /wp-admin2,232 ▲414.93 ▲0.06101.57 ▼11.7779.86 ▲41.35
Posts /wp-admin/edit.php2,120 ▲312.03 ▲0.0036.45 ▼6.5041.15 ▲3.62
Add New Post /wp-admin/post-new.php1,536 ▼623.31 ▲5.17703.36 ▲95.2950.13 ▼3.04
Media Library /wp-admin/upload.php1,413 ▲314.19 ▼0.0299.06 ▲0.7190.33 ▲48.52
关于 /wp-admin/admin.php?page=wideo-about8722.1823.8460.65
WIDEO 播放器 /wp-admin/admin.php?page=wideo1,1421.7427.2253.77

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
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

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 no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wideo/includes/wideo_about.php
    • > /wp-content/plugins/wideo/wideo.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/wideo/includes/wideo_setting.php:7
    • > PHP Warning
      Use of undefined constant WIDEO_VERSION - assumed 'WIDEO_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/wideo/includes/wideo_about.php on line 11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% 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
1 plugin tags: dplayer

wideo/wideo.php 92% from 13 tests

The main PHP script in "WIDEO视频播放器" version 2.0.3 is automatically included on every request by WordPress
It is important to fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected454 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP56527379
JavaScript50269
XML1004
CSS1112

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity27.00
▷ Minimum class complexity27.00
▷ Maximum class complexity27.00
Average method complexity2.73
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
3 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/mini-logo.png4.45KB1.57KB▼ 64.68%
images/wideo-menu.png3.30KB0.56KB▼ 83.09%
images/wideo.png4.77KB1.52KB▼ 68.17%