10% floating-video

Code Review | Floating Video

WordPress plugin Floating Video scored10%from 54 tests.

About plugin

  • Plugin page: floating-video
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.8.1
  • WordPress version: 6.3.1
  • First release: Sep 15, 2017
  • Latest release: Nov 6, 2017
  • Number of updates: 59
  • Update frequency: every 0.9 days
  • Top authors: jefferey11 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,056 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin cannot be installed
    • > Parse error in wp-content/plugins/floating-video/optionsPage.php+136
    syntax error, unexpected end of file

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

This is a short check of server-side resources used by Floating Video
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0050.23 ▲9.45
Dashboard /wp-admin3.31 ▼0.0446.60 ▼20.70
Posts /wp-admin/edit.php3.36 ▲0.0048.65 ▼0.62
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.28 ▼22.68
Media Library /wp-admin/upload.php3.23 ▲0.0034.66 ▼0.15

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Floating Video
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.25 ▼1.122.15 ▲0.5250.80 ▲9.48
Dashboard /wp-admin2,206 ▲185.91 ▲0.78100.66 ▼18.9444.74 ▼3.90
Posts /wp-admin/edit.php2,089 ▼32.06 ▲0.0235.72 ▼4.7932.99 ▼3.22
Add New Post /wp-admin/post-new.php1,514 ▼517.77 ▼5.26683.10 ▲41.5156.94 ▼7.69
Media Library /wp-admin/upload.php1,391 ▲34.21 ▲0.0294.23 ▼9.8941.11 ▼5.25

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/floating-video/floating_video_plugin.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/floating-video/video_player.php:20
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/floating-video/optionsPage.php on line 136

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: video, mp4, youtube, sticky

floating-video/floating_video_plugin.php 85% from 13 tests

The main file in "Floating Video" v. 1.3.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 146 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("floating-video.php" instead of "floating_video_plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin888 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP36923432
HTML1210213
JavaScript2195162
CSS17081

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.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.36MB with 0.24MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/Sshot1.png44.53KB20.46KB▼ 54.04%
img/volume.png67.02KB21.03KB▼ 68.63%
img/full.png43.99KB14.59KB▼ 66.83%
figure_1.png62.74KB19.25KB▼ 69.33%
img/play.png74.77KB22.20KB▼ 70.30%