84% apoyl-videoctrl

Code Review | [凹凸曼]自由控制视频大小

WordPress plugin [凹凸曼]自由控制视频大小 scored84%from 54 tests.

About plugin

  • Plugin page: apoyl-videoctrl
  • Plugin version: 1.4.0
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-6.4
  • WordPress version: 6.3.1
  • First release: Oct 1, 2022
  • Latest release: Nov 23, 2023
  • Number of updates: 6
  • Update frequency: every 69.7 days
  • Top authors: apoyl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /488 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

Server-side resources used by [凹凸曼]自由控制视频大小
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.11 ▼1.59
Dashboard /wp-admin3.35 ▲0.0048.21 ▼13.23
Posts /wp-admin/edit.php3.46 ▲0.1052.30 ▲3.42
Add New Post /wp-admin/post-new.php5.93 ▲0.0493.72 ▲5.21
Media Library /wp-admin/upload.php3.27 ▲0.0436.22 ▲3.01
settings /wp-admin/options-general.php?page=apoyl-videoctrl-settings3.2531.68

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
apoyl-videoctrl-settings
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by [凹凸曼]自由控制视频大小
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7214.70 ▲0.431.90 ▲0.3538.04 ▼2.10
Dashboard /wp-admin2,196 ▲165.48 ▼0.1298.63 ▲1.0742.95 ▼2.68
Posts /wp-admin/edit.php2,104 ▲42.03 ▲0.0641.02 ▲0.1936.89 ▲0.84
Add New Post /wp-admin/post-new.php1,529 ▲322.82 ▼0.16698.33 ▲110.5857.73 ▲7.19
Media Library /wp-admin/upload.php1,401 ▼24.14 ▼0.08116.44 ▲19.3142.62 ▲0.20
settings /wp-admin/options-general.php?page=apoyl-videoctrl-settings8832.1625.2429.66

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 fix the following
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/apoyl-videoctrl/public/partials/public-display.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/apoyl-videoctrl/admin/partials/admin-display.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apoyl_videoctrl_file() in wp-content/plugins/apoyl-videoctrl/public/partials/public-display.php:23
    • > PHP Notice
      Undefined variable: arr in wp-content/plugins/apoyl-videoctrl/public/partials/public-display.php on line 10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
2 plugin tags: video, bilibili

apoyl-videoctrl/apoyl-videoctrl.php Passed 13 tests

The primary PHP file in "[凹凸曼]自由控制视频大小" version 1.4.0 is used by WordPress to initiate all plugin functionality
130 characters long description:
实现统一自定义控制本地视频video和bilibili宽度和高度,显示合适大小的视频,让页面变得更加美观

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
Good job! No executable or dangerous file extensions detected308 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP1393142305
JavaScript1203

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.17
Average class complexity1.75
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.22
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods27
▷ Static methods311.11%
▷ Public methods2281.48%
▷ Protected methods00.00%
▷ Private methods518.52%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin