73% async-vid-list

Code Review | Async Vid List

WordPress plugin Async Vid List scored73%from 54 tests.

About plugin

  • Plugin page: async-vid-list
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5
  • WordPress version: 6.3.1
  • First release: Apr 15, 2013
  • Latest release: Apr 19, 2013
  • Number of updates: 13
  • Update frequency: every 0.5 days
  • Top authors: Thoog_10 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,497 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.33ms] Passed 4 tests

An overview of server-side resources used by Async Vid List
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.24 ▼5.22
Dashboard /wp-admin3.32 ▲0.0148.30 ▲3.39
Posts /wp-admin/edit.php3.37 ▲0.0146.81 ▼2.55
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.47 ▼3.78
Media Library /wp-admin/upload.php3.24 ▲0.0136.18 ▲2.23
WP Async Vid List /wp-admin/options-general.php?page=WP_Async_Vid_List3.2732.75

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Async Vid List
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲15214.00 ▼0.385.80 ▲4.0743.55 ▼5.18
Dashboard /wp-admin2,210 ▲224.87 ▼0.9599.73 ▲1.0938.21 ▼1.83
Posts /wp-admin/edit.php2,093 ▲42.03 ▲0.0235.01 ▼1.5831.30 ▼5.07
Add New Post /wp-admin/post-new.php1,545 ▲3118.27 ▲0.76640.34 ▲24.1249.63 ▼0.07
Media Library /wp-admin/upload.php1,389 ▼24.19 ▼0.0294.79 ▼4.5240.92 ▼2.85
WP Async Vid List /wp-admin/options-general.php?page=WP_Async_Vid_List7041.599.0121.68

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=WP_Async_Vid_List
    • > Error in wp-admin/includes/template.php+1801
    Uncaught ArgumentCountError: Too few arguments to function do_settings_fields(), 1 passed in wp-content/plugins/async-vid-list/templates/settings.php on line 11 and exactly 2 expected in wp-admin/includes/template.php:1801
    Stack trace:
    #0 wp-content/plugins/async-vid-list/templates/settings.php(11): do_settings_fields()
    #1 wp-content/plugins/async-vid-list/async-vid-list.php(60): include('/var/www/wordpr...')
    #2 wp-includes/class-wp-hook.php(310): WP_Async_Vid_List->plugin_settings_page()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/admin.php(259): do_action()
    #6 wp-admin/options-general.php(10): require_once('/var/www/wordpr...')
    #7 {main}
    thrown

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/async-vid-list/templates/settings.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/async-vid-list/async-vid-list.php:77

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=WP_Async_Vid_List
    • > 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: jQuery(...).accordion is not a function" "TypeError: jQuery(...).accordion is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/async-vid-list/js/asyncvidlistAdmin.js?ver=6.3.1:3:25)\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/options-general.php?page=WP_Async_Vid_List
    • > 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: $ is not a function" "TypeError: $ is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/async-vid-list/js/asyncvidlistAdmin.js?ver=6.3.1:16:5)\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/options-general.php?page=WP_Async_Vid_List
    • > 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: jQuery(...).accordion is not a function
    • > GET request to /wp-admin/options-general.php?page=WP_Async_Vid_List
    • > 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: $ is not a function

Optimizations

Plugin configuration Passed 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
8 plugin tags: youtube, video, embed, iframe, asynchronous...

async-vid-list/async-vid-list.php Passed 13 tests

The main PHP file in "Async Vid List" ver. 1.3 adds more information about the plugin and also serves as the entry point for this plugin
87 characters long description:
Lets the user create lists of video embeds that load and play asynchronously in one div

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
Success! There were no dangerous files found in this plugin392 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP23727252
CSS216998
JavaScript215142

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.14
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods228.57%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.40MB with 0.26MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.PNG35.36KB13.75KB▼ 61.10%
screenshot-2.PNG373.69KB124.36KB▼ 66.72%