84% private-uploads

Code Review | Private Uploads

WordPress plugin Private Uploads scored84%from 54 tests.

About plugin

  • Plugin page: private-uploads
  • Plugin version: 0.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.0-5.1
  • WordPress version: 6.3.1
  • First release: Feb 21, 2017
  • Latest release: Feb 22, 2019
  • Number of updates: 9
  • Update frequency: every 80.9 days
  • Top authors: ChrisDennis (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /3,461 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

A check of server-side resources used by Private Uploads
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0245.21 ▼1.28
Dashboard /wp-admin3.33 ▲0.0248.91 ▼1.89
Posts /wp-admin/edit.php3.38 ▲0.0244.27 ▼15.10
Add New Post /wp-admin/post-new.php5.91 ▲0.0295.81 ▼4.46
Media Library /wp-admin/upload.php3.25 ▲0.0237.29 ▼2.38

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Private Uploads
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2914.54 ▲0.341.59 ▼0.3745.56 ▼1.74
Dashboard /wp-admin2,206 ▲184.83 ▼1.02105.63 ▼3.0139.90 ▼0.53
Posts /wp-admin/edit.php2,092 ▲212.03 ▲0.0140.90 ▼3.4137.41 ▲2.63
Add New Post /wp-admin/post-new.php1,514 ▼617.51 ▼5.64669.53 ▲11.9065.73 ▲10.44
Media Library /wp-admin/upload.php1,391 ▲64.21 ▲0.10101.49 ▼31.3949.31 ▲3.59

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/private-uploads/private-uploads.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

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
6 plugin tags: private, web server, privacy, server, nginx...

private-uploads/private-uploads.php Passed 13 tests

"Private Uploads" version 0.1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
77 characters long description:
Prevents non-logged-in users from accessing files in a private uploads folder

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
Everything looks great! No dangerous files found in this plugin97 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1194697

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.40
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
Namespaces1
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.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
There were not PNG files found in your plugin