90% protected-video

Code Review | Protected Video

WordPress plugin Protected Video scored90%from 54 tests.

About plugin

  • Plugin page: protected-video
  • Plugin version: 1.10.9
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.4
  • WordPress version: 6.3.1
  • First release: Jun 9, 2021
  • Latest release: Nov 7, 2023
  • Number of updates: 146
  • Update frequency: every 6.0 days
  • Top authors: alecrust (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

700+ active /13,082 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.07MB] [CPU: ▲0.03ms] Passed 4 tests

A check of server-side resources used by Protected Video
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0738.94 ▲1.78
Dashboard /wp-admin3.37 ▲0.0757.02 ▲9.61
Posts /wp-admin/edit.php3.49 ▲0.1350.52 ▼3.32
Add New Post /wp-admin/post-new.php5.96 ▲0.0795.30 ▼0.29
Media Library /wp-admin/upload.php3.30 ▲0.0634.55 ▲1.96
Protected Video /wp-admin/options-general.php?page=protected-video3.2633.26

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Protected Video
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3414.35 ▼0.051.63 ▲0.0142.44 ▲4.71
Dashboard /wp-admin2,202 ▲255.58 ▼0.0491.43 ▼7.7045.86 ▲7.61
Posts /wp-admin/edit.php2,101 ▲12.00 ▲0.0639.53 ▼4.6836.09 ▼2.24
Add New Post /wp-admin/post-new.php1,544 ▲1823.65 ▼0.04612.24 ▼80.5652.60 ▲1.26
Media Library /wp-admin/upload.php1,404 ▲44.23 ▲0.0198.98 ▼6.5142.38 ▼4.87
Protected Video /wp-admin/options-general.php?page=protected-video7922.0023.7325.67

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

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
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 just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
8 plugin tags: vimeo, gutenberg, video player, block, plyr...

protected-video/protected-video.php Passed 13 tests

The entry point to "Protected Video" version 1.10.9 is a PHP file that has certain tags in its header comment area
61 characters long description:
YouTube/Vimeo player that prevents easy sharing of the video.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected326 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP750225282
JSON10040
CSS2002
JavaScript2002

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity4.00
▷ Minimum class complexity2.00
▷ Maximum class complexity8.00
Average method complexity1.39
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods1875.00%
▷ Protected methods00.00%
▷ Private methods625.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants1
▷ Global constants1100.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 files were detected