10% wp-video-posts

Code Review | WP Video Posts

WordPress plugin WP Video Posts scored10%from 54 tests.

About plugin

  • Plugin page: wp-video-posts
  • Plugin version: 3.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.2-4.1.1
  • WordPress version: 6.3.1
  • First release: Jun 4, 2012
  • Latest release: Jan 29, 2016
  • Number of updates: 69
  • Update frequency: every 19.4 days
  • Top authors: cmstactics (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

800+ active /112,646 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/wp-video-posts/classes/wpvp-widgets-class.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; WPVideosForPostsWidget has a deprecated constructor

Server metrics [RAM: ▼1.69MB] [CPU: ▼56.48ms] Passed 4 tests

Server-side resources used by WP Video Posts
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.31 ▼1.155.72 ▼37.83
Dashboard /wp-admin2.33 ▼1.018.39 ▼54.75
Posts /wp-admin/edit.php2.33 ▼1.028.75 ▼41.75
Add New Post /wp-admin/post-new.php2.33 ▼3.557.23 ▼91.59
Media Library /wp-admin/upload.php2.33 ▼0.908.08 ▼22.32
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=videos2.336.91
Add New Video /wp-admin/post-new.php?post_type=videos2.337.41
Videos /wp-admin/edit.php?post_type=videos2.338.00
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=videos2.336.42
WP Video Posts /wp-admin/options-general.php?page=wp-video-posts2.336.90

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 44 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
category_children
widget_recent-comments
widget_wpvideosforpostswidget

Browser metrics Passed 4 tests

WP Video Posts: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,959 ▲18814.03 ▼0.368.76 ▲6.9443.47 ▼3.94
Dashboard /wp-admin2,232 ▲444.96 ▲0.08105.14 ▼13.0479.01 ▲33.91
Posts /wp-admin/edit.php2,127 ▲382.05 ▼0.0135.09 ▲0.4236.59 ▲0.87
Add New Post /wp-admin/post-new.php1,546 ▲423.28 ▲0.19687.64 ▼11.0065.66 ▲10.56
Media Library /wp-admin/upload.php1,426 ▲384.16 ▼0.0998.12 ▼5.0873.69 ▲27.72
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=videos1,4812.1425.7833.89
Add New Video /wp-admin/post-new.php?post_type=videos2,7697.80172.24137.07
Videos /wp-admin/edit.php?post_type=videos1,1791.9534.1728.00
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=videos1,3452.1425.7628.48
WP Video Posts /wp-admin/options-general.php?page=wp-video-posts1,1962.2025.9132.12

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/wp-video-posts/classes/wpvp-widgets-class.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; WPVideosForPostsWidget has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_wpvideosforpostswidget
    • category_children
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-video-posts
    • > Deprecated in wp-content/plugins/wp-video-posts/classes/wpvp-widgets-class.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; WPVideosForPostsWidget has a deprecated constructor
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-video-posts
    • > Deprecated in wp-content/plugins/wp-video-posts/wpvp.php+43
    Function create_function() is deprecated
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-video-posts
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in WPVideosForPostsWidget is deprecated since version 4.3.0! Use __construct() instead.
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-video-posts
    • > Notice in wp-content/plugins/wp-video-posts/classes/wpvp-helper-class.php+39
    Undefined variable: return
    • > GET request to /wp-admin/options-general.php?page=wp-video-posts
    • > Notice in wp-content/plugins/wp-video-posts/wpvp.php+127
    Undefined index: tab
    • > GET request to /wp-admin/options-general.php?page=wp-video-posts
    • > Notice in wp-content/plugins/wp-video-posts/options/wpvp-options.php+8
    Undefined index: wpvp_hidden
    • > GET request to /wp-admin/options-general.php?page=wp-video-posts
    • > Notice in wp-content/plugins/wp-video-posts/options/wpvp-options.php+202
    Undefined variable: types

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 take a closer look at the following
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-video-posts/options/wpvp-shortcodes-options.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-video-posts/options/wpvp-editor-options.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-video-posts/classes/wpvp-widgets-class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WPVP_Helper' not found in wp-content/plugins/wp-video-posts/options/wpvp-uploader-options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-video-posts/templates/wpvp-frontend-uploader.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_shortcode() in wp-content/plugins/wp-video-posts/templates/wpvp-frontend-editor.php:3
    • > PHP Notice
      Undefined index: wpvp_editor_hidden in wp-content/plugins/wp-video-posts/options/wpvp-editor-options.php on line 2
    • > PHP Notice
      Undefined index: wpvp_hidden in wp-content/plugins/wp-video-posts/options/wpvp-shortcodes-options.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'WPVP_Helper' not found in wp-content/plugins/wp-video-posts/options/wpvp-options.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Video Posts page displaying your video posts.), #2 (WP Video Posts, edit post page.), #3 (WP Video Posts Options page.), #4 (WP Video Posts Widget Options.), #5 (WP Video Posts Widget in action.), #6 (WP Video Posts Front End Uploader.)
The official readme.txt might help

wp-video-posts/wpvp.php 85% from 13 tests

This is the main PHP file of "WP Video Posts" version 3.5.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-video-posts.php" instead of "wpvp.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 207 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin9,055 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript71,3763,3205,156
PHP10322992,167
CSS427230949
LESS1144278755
SVG10028

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity76.00
▷ Minimum class complexity14.00
▷ Maximum class complexity122.00
Average method complexity5.84
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods62
▷ Static methods812.90%
▷ Public methods5690.32%
▷ Protected methods46.45%
▷ Private methods23.23%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
9 PNG files occupy 0.57MB with 0.24MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png86.15KB40.23KB▼ 53.30%
inc/video-js/video-js.png4.46KB3.82KB▼ 14.26%
banner-772x250.png87.91KB56.67KB▼ 35.54%
screenshot-4.png17.89KB8.87KB▼ 50.41%
screenshot-3.png43.83KB17.68KB▼ 59.66%