90% filename-randomizer

Code Review | Filename Randomizer

WordPress plugin Filename Randomizer scored90%from 54 tests.

About plugin

  • Plugin page: filename-randomizer
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.0.1
  • WordPress version: 6.3.1
  • First release: Aug 11, 2022
  • Latest release: Aug 11, 2022
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: mohemiv (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /187 total downloads

Benchmarks

Plugin footprint 83% from 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.01MB] [CPU: ▼4.49ms] Passed 4 tests

A check of server-side resources used by Filename Randomizer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.20 ▼4.31
Dashboard /wp-admin3.31 ▲0.0147.77 ▼2.93
Posts /wp-admin/edit.php3.36 ▲0.0148.04 ▼1.77
Add New Post /wp-admin/post-new.php5.89 ▲0.0185.43 ▼8.93
Media Library /wp-admin/upload.php3.23 ▲0.0139.93 ▲3.51

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Filename Randomizer: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.35 ▲0.071.67 ▼0.4540.98 ▼1.04
Dashboard /wp-admin2,195 ▲155.62 ▲0.0285.73 ▼4.2037.48 ▼9.78
Posts /wp-admin/edit.php2,079 ▼212.03 ▲0.0433.00 ▼4.5830.91 ▼4.98
Add New Post /wp-admin/post-new.php1,526 ▼223.07 ▲0.03673.52 ▼14.4856.74 ▲0.81
Media Library /wp-admin/upload.php1,394 ▼94.18 ▲0.0399.22 ▼16.5745.06 ▼2.15

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
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, 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
No output text or server-side errors detected 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
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Contributors: Contributors not specified
Please take inspiration from this readme.txt

filename-randomizer/filename-randomizer.php Passed 13 tests

"Filename Randomizer" version 1.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
89 characters long description:
Filename Randomizer adds randomization to file names when uploading files into WordPress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin29 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP261317
Markdown26012

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.38
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
Namespaces0
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%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected