83% video-player-by-widgetic

Code Review | Video Player

WordPress plugin Video Player scored83%from 54 tests.

About plugin

  • Plugin page: video-player-by-w...
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.0
  • WordPress version: 6.3.1
  • First release: Jun 27, 2022
  • Latest release: Jul 4, 2022
  • Number of updates: 5
  • Update frequency: every 2.0 days
  • Top authors: widgetic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /243 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.23MB] [CPU: ▲464.90ms] 75% from 4 tests

This is a short check of server-side resources used by Video Player
Please take the time to fix the following items
  • Extra CPU: Try to keep extra CPU usage under 200.00ms (currently 464.90ms on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.23548.99 ▲502.80
Dashboard /wp-admin3.53 ▲0.23307.13 ▲256.07
Posts /wp-admin/edit.php3.58 ▲0.22331.98 ▲284.29
Add New Post /wp-admin/post-new.php6.12 ▲0.231,435.89 ▲1,340.35
Media Library /wp-admin/upload.php3.45 ▲0.22862.92 ▲816.42

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 33 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widgetic/secret
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Video Player
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /5,002 ▲2,24128.95 ▲14.5899.91 ▲98.2334.56 ▼20.80
Dashboard /wp-admin3,587 ▲1,40714.21 ▲8.56247.93 ▲148.8744.57 ▲2.73
Posts /wp-admin/edit.php3,176 ▲1,0769.73 ▲7.70163.73 ▲126.6145.60 ▲10.54
Add New Post /wp-admin/post-new.php2,521 ▲1,11727.55 ▲9.66816.17 ▲254.0869.87 ▲25.88
Media Library /wp-admin/upload.php2,129 ▲73212.79 ▲8.67248.76 ▲132.7775.89 ▲25.45

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widgetic/secret

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined variable: blockWidgetId in wp-content/plugins/video-player-by-widgetic/block.php on line 29
    • > PHP Notice
      Undefined variable: blockPath in wp-content/plugins/video-player-by-widgetic/block.php on line 29
    • > PHP Notice
      Undefined variable: widgetMeta in wp-content/plugins/video-player-by-widgetic/block.php on line 29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/video-player-by-widgetic/block.php:111
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/video-player-by-widgetic/dashboard.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: A description for screenshot #3 is missing in video-player-by-widgetic/assets to your readme.txt
  • Tags: There are too many tags (25 tag instead of maximum 10)
You can take inspiration from this readme.txt

video-player-by-widgetic/index.php 92% from 13 tests

This is the main PHP file of "Video Player" version 1.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("video-player-by-widgetic.php" instead of "index.php")

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
Good job! No executable or dangerous file extensions detected2,055 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JSON5001,441
CSS37458432
PHP43155170
SVG10010
JavaScript2012

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.13
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%
Functions11
▷ Named functions00.00%
▷ Anonymous functions11100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
12 PNG files occupy 2.26MB with 1.46MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-1544x500.png27.41KB7.69KB▼ 71.96%
assets/icon-256x256.png4.11KB1.40KB▼ 65.96%
assets/icon-128x128.png1.73KB0.70KB▼ 59.22%
assets/icon.png1.21KB0.40KB▼ 66.75%
assets/banner-772x250.png11.10KB4.50KB▼ 59.43%