83% floating-player

Code Review | Floating Video Player

WordPress plugin Floating Video Player scored83%from 54 tests.

About plugin

  • Plugin page: floating-player
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-3.5
  • WordPress version: 6.3.1
  • First release: May 14, 2013
  • Latest release: May 14, 2013
  • Number of updates: 4
  • Update frequency: every 7.5 days
  • Top authors: Sanjay_Negi (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /4,106 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

A check of server-side resources used by Floating Video Player
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0448.60 ▼0.47
Dashboard /wp-admin3.33 ▼0.0253.18 ▼10.79
Posts /wp-admin/edit.php3.38 ▲0.0248.89 ▼3.04
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.60 ▼22.64
Media Library /wp-admin/upload.php3.25 ▲0.0236.38 ▼1.39

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Floating Video Player
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,092 ▲34614.28 ▼0.222.08 ▲0.4152.20 ▲9.04
Dashboard /wp-admin2,211 ▲405.62 ▼0.0490.73 ▼11.2444.54 ▼0.40
Posts /wp-admin/edit.php2,116 ▲131.97 ▲0.0238.92 ▲4.6635.95 ▼0.92
Add New Post /wp-admin/post-new.php1,539 ▲1023.56 ▲0.36697.24 ▲23.7163.24 ▲8.21
Media Library /wp-admin/upload.php1,416 ▲134.23 ▲0.12110.15 ▲2.0750.50 ▲2.45

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-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/floating-player/player.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/floating-player/menu-page.php:63

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% 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
These attributes need to be fixed:
  • Donate link: Invalid URI ("76degreecreative.in/sanjay/flash-play.zip")
  • Contributors: Plugin contributors field is missing
  • Screenshots: Please add images for these screenshots: #1 (Player Settings.), #2 (Front End.)
You can look at the official readme.txt

floating-player/player.php 92% from 13 tests

"Floating Video Player" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("floating-player.php" instead of "player.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin3,254 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript38731,0792,642
CSS27777347
PHP213316239
HTML19026

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.47
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%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
player/video-js.png8.04KB3.82KB▼ 52.47%