100% user-private-files

Code Review | Frontend File Manager & Sharing - User Private Files

WordPress plugin Frontend File Manager & Sharing - User Private Files scored 100% from 54 tests.

About plugin

  • Plugin page: user-private-files
  • Plugin version: 1.1.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9.2
  • WordPress version: 5.9.2
  • First release: Jan 29, 2021
  • Latest release: Mar 15, 2022
  • Number of updates: 47
  • Update frequency: every 8.7 days
  • Top authors: deepakkite (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active / 2,709 total downloads

Benchmarks

Plugin footprint Passed 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.07MB] [CPU: ▼292.96ms] Passed 4 tests

A check of server-side resources used by Frontend File Manager & Sharing - User Private Files
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.1656.30 ▲6.51
Dashboard /wp-admin3.50 ▲0.1035.22 ▲0.89
Posts /wp-admin/edit.php3.73 ▲0.0939.60 ▼1.98
Add New Post /wp-admin/post-new.php6.97 ▼0.0092.07 ▼1,170.77
Media Library /wp-admin/upload.php3.38 ▲0.0925.32 ▲0.04

Server storage [IO: ▲0.06MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Please fix the following
  • There were 1 file (0.88KB) illegally modified outside of "wp-content/plugins/user-private-files/" and "wp-content/uploads/"
    • (modified) .htaccess
Filesystem: 16 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Frontend File Manager & Sharing - User Private Files
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,907 ▲15316.58 ▲0.599.68 ▲3.482.99 ▲0.69
Dashboard /wp-admin2,895 ▲346.10 ▼0.07115.78 ▼18.72152.95 ▼9.54
Posts /wp-admin/edit.php2,694 ▲63.36 ▲0.0063.51 ▲0.40142.10 ▼3.56
Add New Post /wp-admin/post-new.php1,752 ▲8120.99 ▲0.22451.83 ▼39.04172.82 ▲4.91
Media Library /wp-admin/upload.php1,695 ▼35.55 ▲0.06138.77 ▼20.19187.24 ▼10.55

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: sharing, file manager, private files, client portal, restrict content...

user-private-files/user-private-files.php Passed 13 tests

The entry point to "Frontend File Manager & Sharing - User Private Files" version 1.1.2 is a PHP file that has certain tags in its header comment area
75 characters long description:
This plugin allows users to manage their uploaded files and access to them.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected1,347 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP67144592
JavaScript13114347
CSS107270
PO File24242138

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.39
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%
Methods2
▷ Static methods2100.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions1076.92%
▷ Anonymous functions323.08%
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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/document.png1.33KB0.23KB▼ 82.78%
images/drag-upload.png0.75KB0.37KB▼ 50.20%