94% wattv-embed

Code Review | Embed Wat.TV Videos

WordPress plugin Embed Wat.TV Videos scored 94% from 54 tests.

About plugin

  • Plugin page: wattv-embed
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-3.8
  • WordPress version: 5.8.1
  • First release: Jan 10, 2014
  • Latest release: Jan 27, 2014
  • Number of updates: 14
  • Update frequency: every 16.7 days
  • Top authors: TJNowell (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,440 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

This is a short check of server-side resources used by Embed Wat.TV Videos
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.0439.34 ▼0.65
Dashboard /wp-admin3.10 ▲0.0444.30 ▼9.85
Posts /wp-admin/edit.php3.18 ▲0.0845.62 ▲1.18
Add New Post /wp-admin/post-new.php5.45 ▲0.0286.27 ▼574.66
Media Library /wp-admin/upload.php3.04 ▲0.0433.19 ▲1.47

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Embed Wat.TV Videos
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲13115.90 ▲0.3512.97 ▲0.2447.08 ▼5.28
Dashboard /wp-admin2,970 ▲366.02 ▲0.10146.22 ▼9.16112.96 ▼3.38
Posts /wp-admin/edit.php2,739 ▼02.71 ▲0.0071.15 ▲1.1989.00 ▼4.81
Add New Post /wp-admin/post-new.php3,636 ▲1,95314.96 ▼3.83473.01 ▲65.92107.38 ▼7.22
Media Library /wp-admin/upload.php1,807 ▼35.05 ▲0.01152.52 ▼3.30131.20 ▲11.44

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_oembed_add_provider() in wp-content/plugins/wattv-embed/wat.tv.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: embed, wattv, video, oembed

wattv-embed/wat.tv.php 92% from 13 tests

The main file in "Embed Wat.TV Videos" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wattv-embed.php" instead of "wat.tv.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
Success! There were no dangerous files found in this plugin187 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP13480164
JSON10020
Markdown1103

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity13.00
▷ Minimum class complexity7.00
▷ Maximum class complexity19.00
Average method complexity3.18
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods872.73%
▷ Public methods11100.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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin