84% simple-video-post

Code Review | Simple Video Post

WordPress plugin Simple Video Post scored84%from 54 tests.

About plugin

  • Plugin page: simple-video-post
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-5.8.1
  • WordPress version: 6.3.1
  • First release: Sep 26, 2021
  • Latest release: Sep 26, 2021
  • Number of updates: 3
  • Update frequency: every 24.3 days
  • Top authors: rawalprashant (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /411 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.50MB] [CPU: ▲1.01ms] Passed 4 tests

An overview of server-side resources used by Simple Video Post
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.96 ▲0.5046.52 ▲5.37
Dashboard /wp-admin3.86 ▲0.5658.56 ▲6.49
Posts /wp-admin/edit.php3.90 ▲0.5463.56 ▲13.56
Add New Post /wp-admin/post-new.php6.38 ▲0.50100.78 ▼11.96
Media Library /wp-admin/upload.php3.70 ▲0.4742.76 ▲4.15
Simple Video Post - Settings /wp-admin/options-general.php?page=svp_settings3.7043.08

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

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

Browser metrics Passed 4 tests

Simple Video Post: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,943 ▲19714.44 ▲0.091.66 ▼0.2537.25 ▼4.10
Dashboard /wp-admin2,352 ▲1786.24 ▲0.71121.28 ▲24.1641.50 ▼6.73
Posts /wp-admin/edit.php2,280 ▲1803.32 ▲1.3556.54 ▲18.3234.80 ▼1.71
Add New Post /wp-admin/post-new.php6,858 ▲5,32826.05 ▲2.96855.97 ▲173.6948.36 ▼14.94
Media Library /wp-admin/upload.php1,480 ▲804.16 ▼0.0585.57 ▼23.1542.92 ▼4.21
Simple Video Post - Settings /wp-admin/options-general.php?page=svp_settings1,2783.1741.4094.20

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 8 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • svp_version
    • svp_player_settings
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
The following issues need your attention
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/simple-video-post/admin/partials/settings.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/simple-video-post/admin/partials/video-sources.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/simple-video-post/admin/partials/video-tracks.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses_post() in wp-content/plugins/simple-video-post/public/templates/single-video.php:106
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/simple-video-post/public/templates/single-video.php on line 85
    • > PHP Notice
      Undefined variable: attributes in wp-content/plugins/simple-video-post/public/templates/single-video.php on line 85

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: facebook html5 player, html5 video player, youtube html5 player, videojs, vimeo html5 player...

simple-video-post/simple-video-post.php Passed 13 tests

"Simple Video Post" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
122 characters long description:
A simple video post plugin that support YouTube/Vimeo/Facebook/Dailymotion like video sharing website. No coding required.

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
Good job! No executable or dangerous file extensions detected11,952 lines of code in 118 files:
LanguageFilesBlank linesComment linesLines of code
PHP185851,0563,262
JavaScript511361493,198
CSS93661242,925
JSON37102,438
SVG200128
HTML1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity25.33
▷ Minimum class complexity1.00
▷ Maximum class complexity126.00
Average method complexity5.56
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods64
▷ Static methods46.25%
▷ Public methods5687.50%
▷ Protected methods00.00%
▷ Private methods812.50%
Functions36
▷ Named functions36100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/assets/images/play.png1.28KB1.57KB0.00%
public/assets/images/placeholder-image.png8.60KB2.67KB▼ 68.91%
admin/assets/images/logo.png1.18KB1.19KB0.00%