83% embed-peertube-playlist

Code Review | Embed Peertube Playlist

WordPress plugin Embed Peertube Playlist scored83%from 54 tests.

About plugin

  • Plugin page: embed-peertube-pl...
  • Plugin version: 1.07
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.3
  • WordPress version: 6.3.1
  • First release: Mar 18, 2020
  • Latest release: Jul 31, 2023
  • Number of updates: 20
  • Update frequency: every 61.6 days
  • Top authors: manu225 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /1,412 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▲2.90ms] Passed 4 tests

Analyzing server-side resources used by Embed Peertube Playlist
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0446.18 ▲3.49
Dashboard /wp-admin3.34 ▲0.0451.63 ▲0.59
Posts /wp-admin/edit.php3.39 ▲0.0448.94 ▲7.70
Add New Post /wp-admin/post-new.php5.92 ▲0.0498.06 ▲1.50
Media Library /wp-admin/upload.php3.27 ▲0.0441.33 ▲6.03
Settings /wp-admin/admin.php?page=playlist-pt-settings3.2334.31
Peertube Playlists /wp-admin/admin.php?page=playlists_peertube3.2433.99

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 12 new files
Database: 1 new table, 7 new options
New tables
wp_playlists_peertube
New WordPress options
theysaidso_admin_options
pl_peertube_url
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Embed Peertube Playlist: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,951 ▲18013.58 ▼0.655.32 ▲3.1341.97 ▼4.68
Dashboard /wp-admin2,263 ▲755.83 ▼0.05104.84 ▼8.7583.25 ▲36.17
Posts /wp-admin/edit.php2,161 ▲692.00 ▼0.0436.33 ▼7.7731.62 ▼5.32
Add New Post /wp-admin/post-new.php1,736 ▲21722.33 ▼0.88712.08 ▲91.1050.04 ▼9.10
Media Library /wp-admin/upload.php1,454 ▲634.12 ▼0.05100.69 ▲0.3473.23 ▲27.81
Settings /wp-admin/admin.php?page=playlist-pt-settings8662.0524.9926.73
Peertube Playlists /wp-admin/admin.php?page=playlists_peertube9012.0324.8535.58

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/embed-peertube-playlist/peertube-playlist.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 81% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: Please add an image for screenshot #1 (assets/screenshot.png)
  • Tags: Please delete some tags, you are using 17 tag instead of maximum 10
  • Screenshots: Please a description for screenshot #0 in embed-peertube-playlist/assets to your readme.txt
The official readme.txt might help

embed-peertube-playlist/peertube-playlist.php 77% from 13 tests

The entry point to "Embed Peertube Playlist" version 1.07 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Domain Path: Use only dashes and lowercase characters for the domain path ("")
  • Main file name: Name the main plugin file the same as the plugin slug ("embed-peertube-playlist.php" instead of "peertube-playlist.php")
  • Domain Path: Please prefix the domain path with a forward slash character ("/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin386 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP48221253
CSS215094
SVG13039

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
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%
Functions10
▷ Named functions990.00%
▷ Anonymous functions110.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/save.png0.54KB0.39KB▼ 28.11%
images/remove.png1.27KB1.20KB▼ 5.76%
images/fb.png1.59KB1.00KB▼ 37.42%