83% webtorrent

Code Review | WebTorrent

WordPress plugin WebTorrent scored83%from 54 tests.

About plugin

  • Plugin page: webtorrent
  • Plugin version: 0.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7.3
  • WordPress version: 6.3.1
  • First release: Nov 22, 2016
  • Latest release: Mar 13, 2017
  • Number of updates: 16
  • Update frequency: every 7.8 days
  • Top authors: runsh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /3,039 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.71ms] Passed 4 tests

An overview of server-side resources used by WebTorrent
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0343.72 ▲6.13
Dashboard /wp-admin3.33 ▼0.0145.87 ▼13.90
Posts /wp-admin/edit.php3.39 ▲0.0342.89 ▼1.31
Add New Post /wp-admin/post-new.php5.92 ▲0.0384.00 ▼14.46
Media Library /wp-admin/upload.php3.26 ▲0.0332.82 ▼1.18
WebTorrent /wp-admin/options-general.php?page=webtorrent3.2230.32

Server storage [IO: ▲0.31MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WebTorrent
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲7814.62 ▲0.6730.64 ▲29.0241.15 ▼0.62
Dashboard /wp-admin2,202 ▲225.61 ▼0.0686.77 ▼5.2239.32 ▼5.77
Posts /wp-admin/edit.php2,104 ▲41.94 ▼0.0637.94 ▲1.7632.44 ▲0.26
Add New Post /wp-admin/post-new.php1,529 ▲123.60 ▲0.43594.93 ▼47.5674.61 ▲13.82
Media Library /wp-admin/upload.php1,407 ▲44.22 ▲0.04100.45 ▼2.6043.57 ▼0.99
WebTorrent /wp-admin/options-general.php?page=webtorrent8082.0126.2124.83

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

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 no errors were found, this is by no means 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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/webtorrent/webtorrent.php

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 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === webtorrent === )
Please take inspiration from this readme.txt

webtorrent/webtorrent.php 85% from 13 tests

This is the main PHP file of "WebTorrent" version 0.1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected447 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript20286218
PHP15723181
CSS12448

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin