74% external-videos

Code Review | External Videos

WordPress plugin External Videos scored74%from 54 tests.

About plugin

  • Plugin page: external-videos
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2.2
  • WordPress version: 6.3.1
  • First release: May 25, 2010
  • Latest release: Jul 26, 2023
  • Number of updates: 112
  • Update frequency: every 43.0 days
  • Top authors: silviapfeiffer1 (61.61%)nimmolo (23.21%)johnfjohnf (16.96%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /33,165 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.79MB] [CPU: ▲7.29ms] Passed 4 tests

An overview of server-side resources used by External Videos
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.28 ▲0.8253.37 ▲12.39
Dashboard /wp-admin4.10 ▲0.7951.30 ▼2.38
Posts /wp-admin/edit.php4.15 ▲0.8058.17 ▲11.00
Add New Post /wp-admin/post-new.php6.68 ▲0.7998.45 ▲8.14
Media Library /wp-admin/upload.php4.02 ▲0.7950.72 ▲14.39
External Videos /wp-admin/edit.php?post_type=external-videos4.0850.54
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=external-videos4.0140.38
Add New /wp-admin/post-new.php?post_type=external-videos4.1867.43
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=external-videos4.0344.52
External Videos /wp-admin/options-general.php?page=external-videos/external-videos.php4.0541.54

Server storage [IO: ▲0.33MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 43 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-videos
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
sp_external_videos_options
category_children
theysaidso_admin_options

Browser metrics Passed 4 tests

External Videos: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,949 ▲18813.50 ▼0.8510.10 ▲8.2543.52 ▼0.82
Dashboard /wp-admin2,232 ▲525.63 ▼0.0090.96 ▼7.6442.24 ▼1.71
Posts /wp-admin/edit.php2,163 ▲632.00 ▲0.0440.52 ▲3.5237.15 ▲1.73
Add New Post /wp-admin/post-new.php1,569 ▲3823.16 ▲0.03698.65 ▲11.1056.22 ▼3.24
Media Library /wp-admin/upload.php1,453 ▲534.27 ▲0.02111.24 ▼1.0447.05 ▼0.62
External Videos /wp-admin/edit.php?post_type=external-videos1,2921.9838.6135.82
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=external-videos1,3642.2630.1830.98
Add New /wp-admin/post-new.php?post_type=external-videos3,0058.05184.7875.06
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=external-videos1,5502.1828.8034.49
External Videos /wp-admin/options-general.php?page=external-videos/external-videos.php1,9742.0042.5034.91

Uninstaller [IO: ▲0.33MB] [DB: ▲0.01MB] 50% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstaller has failed for this plugin, leaving 43 files (0.33MB) in the plugin directory
    • (new file) css/ev-admin.css
    • (new file) core/ev-sync-posts.php
    • (new file) TODO
    • (new file) core/ev-media-gallery.php
    • (new file) core/simple_html_dom.php
    • (new file) core/ev-admin.php
    • (new file) core/ev-widget.php
    • (new file) core/ev-helpers.php
    • (new file) DEVELOPMENT.md
    • (new file) core/ev-settings-forms.php
    • ...
  • This plugin does not fully uninstall, leaving 9 options in the database
    • theysaidso_admin_options
    • sp_external_videos_options
    • category_children
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-videos

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'MEXP_Template' not found in wp-content/plugins/external-videos/hosts/wistia/mexp-ev-wistia-template.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/external-videos/hosts/vimeo/mexp-ev-vimeo-service.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/external-videos/hosts/wistia/mexp-ev-wistia-service.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'MEXP_Template' not found in wp-content/plugins/external-videos/hosts/youtube/mexp-ev-youtube-template.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'MEXP_Plugin' not found in wp-content/plugins/external-videos/mexp/class.mexp.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'MEXP_Template' not found in wp-content/plugins/external-videos/hosts/dailymotion/mexp-ev-dailymotion-template.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'MEXP_Template' not found in wp-content/plugins/external-videos/hosts/vimeo/mexp-ev-vimeo-template.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/external-videos/hosts/youtube/mexp-ev-youtube-service.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/external-videos/hosts/dailymotion/mexp-ev-dailymotion-service.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: Add an image for screenshot #7 (Media Uploader: inserting External Videos into any page or post)
The official readme.txt might help

external-videos/external-videos.php Passed 13 tests

The entry point to "External Videos" version 2.0.1 is a PHP file that has certain tags in its header comment area
111 characters long description:
Automatically syncs your videos from YouTube, Vimeo, Wistia or Dailymotion to your WordPress site as new posts.

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
No dangerous file extensions were detected6,147 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
PHP281,4692,3644,678
JavaScript224295583
PO File2136140354
CSS25145290
Markdown3920227
YAML11015

PHP code Passed 2 tests

A short 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.31
Average class complexity18.03
▷ Minimum class complexity1.00
▷ Maximum class complexity119.00
Average method complexity3.07
▷ Minimum method complexity1.00
▷ Maximum method complexity56.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes38
▷ Abstract classes513.16%
▷ Concrete classes3386.84%
▷ Final classes26.06%
Methods318
▷ Static methods3912.26%
▷ Public methods28489.31%
▷ Protected methods206.29%
▷ Private methods144.40%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants26
▷ Global constants1869.23%
▷ Class constants830.77%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin