90% toms-product-video

Code Review | TomS Product Video

WordPress plugin TomS Product Video scored90%from 54 tests.

About plugin

  • Plugin page: toms-product-video
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 9, 2022
  • Latest release: Dec 9, 2022
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: tomsneddon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,583 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.14MB] [CPU: ▼1.83ms] Passed 4 tests

A check of server-side resources used by TomS Product Video
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1540.66 ▲5.14
Dashboard /wp-admin3.45 ▲0.1447.77 ▲2.05
Posts /wp-admin/edit.php3.56 ▲0.2045.87 ▼3.63
Add New Post /wp-admin/post-new.php6.03 ▲0.1482.66 ▼8.65
Media Library /wp-admin/upload.php3.37 ▲0.1436.75 ▲2.90

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for TomS Product Video
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.14 ▼1.261.93 ▲0.1644.92 ▲0.34
Dashboard /wp-admin2,203 ▲125.83 ▲0.9396.18 ▼9.3539.63 ▼2.87
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0234.88 ▼1.6636.38 ▼1.55
Add New Post /wp-admin/post-new.php1,533 ▼023.00 ▼0.51652.14 ▲0.1554.68 ▲10.08
Media Library /wp-admin/upload.php1,382 ▼64.21 ▲0.0798.58 ▼1.1742.90 ▲1.70

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: video url, add to cart video, video from url, product video, video player...

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

The primary PHP file in "TomS Product Video" version 1.0.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Requires PHP: Required version does not match 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 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin994 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP55639558
CSS1010199
PO File25254146
JavaScript18291

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity12.00
▷ Minimum class complexity1.00
▷ Maximum class complexity33.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/toms-product-video.png6.83KB3.83KB▼ 43.95%
assets/img/toms-wvp-preview.png13.70KB5.59KB▼ 59.21%
assets/img/toms-wvp-preview-7.png10.19KB4.51KB▼ 55.74%