90% random-file-upload-names

Code Review | Random File Upload Names

WordPress plugin Random File Upload Names scored90%from 54 tests.

About plugin

  • Plugin page: random-file-uploa...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Jul 9, 2018
  • Latest release: Jan 21, 2020
  • Number of updates: 3
  • Update frequency: every 187.0 days
  • Top authors: wpza (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,267 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.65ms] Passed 4 tests

This is a short check of server-side resources used by Random File Upload Names
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.78 ▼1.93
Dashboard /wp-admin3.32 ▲0.0147.22 ▼5.04
Posts /wp-admin/edit.php3.37 ▲0.0143.29 ▼7.45
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.92 ▼12.19
Media Library /wp-admin/upload.php3.24 ▲0.0135.09 ▲2.11

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Random File Upload Names
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.77 ▲0.211.87 ▲0.0244.09 ▼0.43
Dashboard /wp-admin2,209 ▲215.86 ▲0.01109.18 ▼3.0240.29 ▼6.93
Posts /wp-admin/edit.php2,086 ▼62.01 ▲0.0435.48 ▼5.1131.20 ▼5.21
Add New Post /wp-admin/post-new.php1,514 ▼917.70 ▼5.37588.41 ▼92.8651.17 ▼0.95
Media Library /wp-admin/upload.php1,388 ▲34.23 ▼0.0096.00 ▼13.0445.94 ▲1.01

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

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 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: change file upload names, security, md5, random file names, encypt

random-file-upload-names/wpza-rfun.php 92% from 13 tests

The entry point to "Random File Upload Names" version 1.0.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("random-file-upload-names.php" instead of "wpza-rfun.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin39 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP352239

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.71
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods3
▷ Static methods00.00%
▷ Public methods133.33%
▷ Protected methods00.00%
▷ Private methods266.67%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin