89% toms-video-player

Code Review | TomS Video Player

WordPress plugin TomS Video Player scored89%from 54 tests.

About plugin

  • Plugin page: toms-video-player
  • Plugin version: 2.1.8
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.1
  • WordPress version: 6.3.1
  • First release: Sep 16, 2021
  • Latest release: Oct 31, 2022
  • Number of updates: 31
  • Update frequency: every 13.2 days
  • Top authors: tomsneddon (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /5,524 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 successfully, without throwing any errors or notices

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

An overview of server-side resources used by TomS Video Player
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.87 ▼3.69
Dashboard /wp-admin3.31 ▲0.0145.06 ▼3.68
Posts /wp-admin/edit.php3.36 ▲0.0156.27 ▲7.52
Add New Post /wp-admin/post-new.php5.89 ▲0.0192.75 ▼4.28
Media Library /wp-admin/upload.php3.23 ▲0.0138.05 ▲5.45

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for TomS Video Player
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.19 ▼1.451.84 ▼0.1045.49 ▲1.66
Dashboard /wp-admin2,203 ▲125.91 ▲1.0597.44 ▼5.6138.57 ▼1.41
Posts /wp-admin/edit.php2,092 ▲32.12 ▲0.0843.99 ▲5.5938.96 ▲8.02
Add New Post /wp-admin/post-new.php6,355 ▲4,83427.61 ▲4.37854.50 ▲264.6859.46 ▲10.52
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.0193.79 ▼3.8143.21 ▼1.83

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 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 Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
The official readme.txt is a good inspiration

toms-video-player/toms-video-player.php 92% from 13 tests

The main PHP script in "TomS Video Player" version 2.1.8 is automatically included on every request by WordPress
The following require your attention:
  • Requires PHP: Required version must be the same as the one declared in readme.txt ("7.4" instead of "7.0")

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
No dangerous file extensions were detected1,527 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript15689801
JSON300297
PHP21816178
PO File15456155
CSS191296

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.84
Average class complexity66.00
▷ Minimum class complexity66.00
▷ Maximum class complexity66.00
Average method complexity14.00
▷ Minimum method complexity1.00
▷ Maximum method complexity62.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/default.png42.12KB16.23KB▼ 61.47%
assets/img/toms-video-player.png8.10KB3.04KB▼ 62.51%
assets/img/TomS-68.png1.34KB1.79KB0.00%