94% sensei-video-protection

Code Review | Sensei-video-protection

WordPress plugin Sensei-video-protection scored 94% from 53 tests.

About plugin

  • Plugin page: sensei-video-prot...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.25-4.4.2
  • WordPress version: 5.8.1
  • First release: Jan 24, 2016
  • Latest release: Feb 25, 2016
  • Number of updates: 5
  • Update frequency: every 6.8 days
  • Top authors: naizin (100%)

Code review

53 tests

User reviews

1 review

Install metrics

40+ active / 1,739 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼263.08ms] Passed 4 tests

A check of server-side resources used by Sensei-video-protection
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1441.09 ▲16.57
Dashboard /wp-admin3.09 ▲0.0443.38 ▲3.97
Posts /wp-admin/edit.php3.14 ▲0.0445.25 ▲1.38
Add New Post /wp-admin/post-new.php5.45 ▲0.0394.82 ▼1,050.49
Media Library /wp-admin/upload.php3.03 ▲0.0331.83 ▼7.19
Sensei security /wp-admin/options-general.php?page=sensei-security-cfg2.9828.68

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Sensei-video-protection
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,654 ▲4816.23 ▲0.587.52 ▼0.5146.43 ▲1.62
Dashboard /wp-admin2,938 ▲895.83 ▼0.22141.42 ▼5.54104.71 ▼1.24
Posts /wp-admin/edit.php2,708 ▲22.69 ▼0.1266.73 ▼1.5492.98 ▲5.82
Add New Post /wp-admin/post-new.php1,654 ▲6617.16 ▼4.33364.30 ▲94.21106.46 ▼3.25
Media Library /wp-admin/upload.php1,777 ▲55.00 ▼0.01150.70 ▼13.19105.46 ▼8.92
Sensei security /wp-admin/options-general.php?page=sensei-security-cfg1,0212.1153.6164.65

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=sensei-security-cfg
    • > Notice in wp-content/plugins/sensei-video-protection/sensei-security.php+89
    Trying to access array offset on value of type bool

SRP Passed 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
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 a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: video, sensei, protecting video contents

sensei-video-protection/sensei-security.php 85% from 13 tests

"Sensei-video-protection" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Description: The plugin description must be longer than 10 characters (currently 0 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("sensei-video-protection.php" instead of "sensei-security.php")

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
Good job! No executable or dangerous file extensions detected184 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript214398
PHP1141186

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin