Benchmarks
Plugin footprint 82% from 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 successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.05MB] [CPU: ▼10.97ms] 75% from 4 tests
An overview of server-side resources used by api.video
The following require your attention
- CPU: You should keep total CPU usage under 500.00ms (currently 568.93ms on /wp-admin/admin.php?page=settings-api-video)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.52 ▲0.06 | 37.49 ▼5.89 |
Dashboard /wp-admin | 3.37 ▲0.02 | 43.98 ▼15.93 |
Posts /wp-admin/edit.php | 3.42 ▲0.06 | 47.40 ▼5.60 |
Add New Post /wp-admin/post-new.php | 5.97 ▲0.08 | 79.93 ▼16.45 |
Media Library /wp-admin/upload.php | 3.29 ▲0.06 | 36.40 ▲5.01 |
Settings /wp-admin/admin.php?page=settings-api-video | 3.75 | 568.93 |
Library /wp-admin/admin.php?page=api.video-library | 3.75 | 414.37 |
Add New /wp-admin/admin.php?page=add-new-video | 3.75 | 433.71 |
Server storage [IO: ▲21.10MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 637 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
widget_recent-comments |
widget_recent-posts |
db_upgraded |
can_compress_scripts |
theysaidso_admin_options |
Browser metrics Passed 4 tests
An overview of browser requirements for api.video
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,827 ▲66 | 13.25 ▼1.10 | 5.41 ▲3.64 | 39.54 ▼0.92 |
Dashboard /wp-admin | 2,228 ▲51 | 4.97 ▼0.63 | 99.97 ▲10.89 | 42.39 ▲2.45 |
Posts /wp-admin/edit.php | 2,139 ▲39 | 2.45 ▲0.46 | 34.99 ▼0.36 | 29.05 ▼8.40 |
Add New Post /wp-admin/post-new.php | 1,559 ▲31 | 23.23 ▲2.31 | 664.00 ▲56.46 | 35.62 ▼16.14 |
Media Library /wp-admin/upload.php | 1,423 ▲23 | 4.20 ▲0.01 | 97.55 ▲2.85 | 40.68 ▼4.10 |
Settings /wp-admin/admin.php?page=settings-api-video | 847 | 1.93 | 26.18 | 25.06 |
Library /wp-admin/admin.php?page=api.video-library | 819 | 1.93 | 25.35 | 21.45 |
Add New /wp-admin/admin.php?page=add-new-video | 819 | 2.05 | 26.79 | 21.82 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_recent-posts
- widget_recent-comments
- db_upgraded
- theysaidso_admin_options
- can_compress_scripts
- widget_theysaidso_widget
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
Please fix the following server-side errors
- 3 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=add-new-video
- > Notice in wp-content/plugins/api-video/includes/av_functions.php+31
Undefined property: stdClass::$token_type
- 3 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=add-new-video
- > Notice in wp-content/plugins/api-video/includes/av_functions.php+32
Undefined property: stdClass::$access_token
SRP 0% 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 items
- 7× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/api-video/vendor/api-video/php-api-client/examples/laravel/video_upload/resources/views/response.blade.php
- > /wp-content/plugins/api-video/api.video.php
- > /wp-content/plugins/api-video/vendor/api-video/php-api-client/examples/laravel/infinite_scroll/resources/views/holidayView.blade.php
- > /wp-content/plugins/api-video/vendor/api-video/php-api-client/examples/laravel/video_upload/resources/views/welcome.blade.php
- > /wp-content/plugins/api-video/vendor/api-video/php-api-client/examples/laravel/infinite_scroll/resources/views/data.blade.php
- > /wp-content/plugins/api-video/vendor/api-video/php-api-client/examples/laravel/video_upload/resources/views/home.blade.php
- > /wp-content/plugins/api-video/vendor/api-video/php-api-client/examples/laravel/infinite_scroll/resources/views/welcome.blade.php
- 322× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Interface 'ApiVideo\\Client\\Model\\ModelInterface' not found in wp-content/plugins/api-video/vendor/api-video/php-api-client/src/Model/Metadata.php:27
- > PHP Fatal error
require(): Failed opening required 'wp-content/plugins/api-video/vendor/api-video/php-api-client/examples/vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/api-video/vendor/api-video/php-api-client/examples/delete_token.php on line 5
- > PHP Warning
require(wp-content/plugins/api-video/vendor/api-video/php-api-client/examples/vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/api-video/vendor/api-video/php-api-client/examples/authenticate.php on line 2
- > PHP Fatal error
Uncaught Error: Interface 'ApiVideo\\Client\\Model\\ModelInterface' not found in wp-content/plugins/api-video/vendor/api-video/php-api-client/src/Model/TokenCreationPayload.php:27
- > PHP Fatal error
Uncaught LogicException: You cannot use "Symfony\\Component\\HttpClient\\AmpHttpClient" as the "amphp/http-client" package is not installed. Try running "composer require amphp/http-client:^4.2.1". in wp-content/plugins/api-video/vendor/symfony/http-client/AmpHttpClient.php:33
- > PHP Fatal error
Uncaught Error: Call to undefined function env() in wp-content/plugins/api-video/vendor/api-video/php-api-client/examples/laravel/video_upload/config/database.php:18
- > PHP Fatal error
require(): Failed opening required 'wp-content/plugins/api-video/vendor/api-video/php-api-client/examples/vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/api-video/vendor/api-video/php-api-client/examples/create_token.php on line 4
- > PHP Fatal error
Uncaught Error: Interface 'ApiVideo\\Client\\Model\\ModelInterface' not found in wp-content/plugins/api-video/vendor/api-video/php-api-client/src/Model/RefreshTokenPayload.php:27
- > PHP Fatal error
Uncaught Error: Class 'Illuminate\\Foundation\\Http\\Middleware\\TrimStrings' not found in wp-content/plugins/api-video/vendor/api-video/php-api-client/examples/laravel/infinite_scroll/app/Http/Middleware/TrimStrings.php:7
- > PHP Fatal error
Uncaught Error: Interface 'Symfony\\Component\\HttpClient\\Retry\\RetryStrategyInterface' not found in wp-content/plugins/api-video/vendor/symfony/http-client/Retry/GenericRetryStrategy.php:23
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
- > GET request to /wp-admin/admin.php?page=add-new-video
- > Console-api (warning) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of null (reading 'dataset')" "TypeError: Cannot read properties of null (reading 'dataset')\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/api-video/assets/script.js?ver=6.3.1:10:39)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
- > GET request to /wp-admin/admin.php?page=add-new-video
- > Javascript (severe) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: Cannot read properties of null (reading 'dataset')
Optimizations
Plugin configuration 79% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: player, video
api-video/api.video.php 54% from 13 tests
Analyzing the main PHP file in "api.video" version 1.0.9
Please take the time to fix the following:
- Domain Path: The domain path must begin with a forward slash character ("/where to find the translation files (see How to Internationalize Your Plugin)")
- Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
- Description: Keep the plugin description shorter than 140 characters (currently 308 characters long)
- Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("where to find the translation files (see How to Internationalize Your Plugin)")
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("api-video.php" instead of "api.video.php")
- Git Repository: A Git repository was detected inside this plugin
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected49,729 lines of code in 548 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 382 | 6,874 | 15,422 | 27,471 |
CSS | 4 | 1,513 | 48 | 8,962 |
JSON | 25 | 0 | 0 | 8,895 |
Markdown | 111 | 2,129 | 0 | 3,419 |
JavaScript | 7 | 158 | 249 | 446 |
Blade | 6 | 46 | 8 | 354 |
YAML | 6 | 4 | 0 | 92 |
XML | 4 | 0 | 2 | 72 |
Sass | 2 | 4 | 6 | 17 |
SVG | 1 | 0 | 0 | 1 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.36 |
Average class complexity | 9.27 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 181.00 |
Average method complexity | 2.20 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 46.00 |
Code structure | ||
---|---|---|
Namespaces | 46 | |
Interfaces | 51 | |
Traits | 14 | |
Classes | 261 | |
▷ Abstract classes | 6 | 2.30% |
▷ Concrete classes | 255 | 97.70% |
▷ Final classes | 56 | 21.96% |
Methods | 2,052 | |
▷ Static methods | 206 | 10.04% |
▷ Public methods | 1,880 | 91.62% |
▷ Protected methods | 23 | 1.12% |
▷ Private methods | 149 | 7.26% |
Functions | 181 | |
▷ Named functions | 30 | 16.57% |
▷ Anonymous functions | 151 | 83.43% |
Constants | 59 | |
▷ Global constants | 4 | 6.78% |
▷ Class constants | 55 | 93.22% |
▷ Public constants | 40 | 72.73% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
.wordpress-org/icon-256x256.png | 7.58KB | 3.94KB | ▼ 48.03% |
.wordpress-org/icon-128x128.png | 3.95KB | 2.33KB | ▼ 41.10% |
vendor/api-video/php-api-client/tests/resources/logo.png | 8.12KB | 4.03KB | ▼ 50.38% |