84% hover-video-preview

Code Review | Hover Video Preview

WordPress plugin Hover Video Preview scored84%from 54 tests.

About plugin

  • Plugin page: hover-video-preview
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.1
  • WordPress version: 6.3.1
  • First release: May 1, 2015
  • Latest release: May 11, 2015
  • Number of updates: 4
  • Update frequency: every 2.8 days
  • Top authors: jasonpancake (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

70+ active /2,821 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.63ms] Passed 4 tests

A check of server-side resources used by Hover Video Preview
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0638.76 ▼2.44
Dashboard /wp-admin3.36 ▲0.0147.39 ▼15.60
Posts /wp-admin/edit.php3.48 ▲0.1246.55 ▲1.09
Add New Post /wp-admin/post-new.php5.96 ▲0.0780.55 ▼13.55
Media Library /wp-admin/upload.php3.29 ▲0.0533.97 ▲1.24
Hover Video Preview /wp-admin/options-general.php?page=settings_view3.2528.96

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 60 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Hover Video Preview
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,929 ▲18314.45 ▼0.3013.64 ▲11.4646.80 ▲3.24
Dashboard /wp-admin2,214 ▲265.86 ▲0.9998.71 ▼17.7038.39 ▼3.64
Posts /wp-admin/edit.php2,097 ▲52.01 ▼0.0133.86 ▼1.7235.12 ▼0.69
Add New Post /wp-admin/post-new.php1,521 ▲717.51 ▲0.07681.40 ▲14.0451.20 ▼2.21
Media Library /wp-admin/upload.php1,396 ▲144.22 ▼0.1897.35 ▲3.6640.34 ▼2.27
Hover Video Preview /wp-admin/options-general.php?page=settings_view8812.1724.0331.87

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/hover-video-preview/admin/partials/hover-video-preview-admin-settings.php
    • > /wp-content/plugins/hover-video-preview/public/partials/hover-video-preview-public-display.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 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
6 plugin tags: video hover, video, youtube, video preview, video tooltip...

hover-video-preview/hover-video-preview.php 92% from 13 tests

The primary PHP file in "Hover Video Preview" version 1.0.2 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Everything looks great! No dangerous files found in this plugin3,460 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript82603111,137
CSS11103631,041
HTML2753688
PHP12124539264
SVG201227
Markdown16059
JSON20044

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.05
Average class complexity1.29
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.07
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods28
▷ Static methods27.14%
▷ Public methods2382.14%
▷ Protected methods00.00%
▷ Private methods517.86%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

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
9 PNG files occupy 0.18MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/vendor/tooltipster/doc/images/browser-ie.png5.18KB2.46KB▼ 52.57%
public/vendor/tooltipster/doc/images/browser-safari.png12.14KB4.50KB▼ 62.90%
public/vendor/tooltipster/doc/images/browser-firefox.png9.13KB3.80KB▼ 58.35%
public/vendor/tooltipster/doc/images/favicon.png0.37KB0.23KB▼ 37.83%
public/vendor/tooltipster/doc/images/browser-chrome.png8.24KB3.45KB▼ 58.09%