72% dh-rename-uploaded-files

Code Review | DH - Rename Uploaded Files

WordPress plugin DH - Rename Uploaded Files scored 72% from 54 tests.

About plugin

  • Plugin page: dh-rename-uploade...
  • Plugin version: 3...
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Sep 24, 2019
  • Latest release: Dec 17, 2022
  • Number of updates: 36
  • Update frequency: every 32.8 days
  • Top authors: k0z3y (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,044 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by DH - Rename Uploaded Files
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.00 ▼5.62
Dashboard /wp-admin3.32 ▲0.0145.64 ▼12.21
Posts /wp-admin/edit.php3.37 ▲0.0147.24 ▼0.40
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.59 ▼7.00
Media Library /wp-admin/upload.php3.24 ▲0.0134.52 ▲1.03
DH – Rename Uploaded Files /wp-admin/options-general.php?page=dh-rename-uploaded-files3.2536.57

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for DH - Rename Uploaded Files
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲14113.58 ▼0.735.21 ▲3.1840.17 ▼3.84
Dashboard /wp-admin2,210 ▲225.85 ▲0.01107.33 ▼7.8338.92 ▼5.54
Posts /wp-admin/edit.php2,096 ▲72.04 ▲0.0040.87 ▲2.4734.92 ▲0.56
Add New Post /wp-admin/post-new.php1,549 ▲2118.23 ▼4.96598.39 ▼62.6570.03 ▲11.88
Media Library /wp-admin/upload.php1,392 ▲44.30 ▲0.0995.66 ▼21.1240.28 ▼2.05
DH – Rename Uploaded Files /wp-admin/options-general.php?page=dh-rename-uploaded-files8933.1339.4346.11

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 detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=dh-rename-uploaded-files
    • > Notice in wp-content/plugins/dh-rename-uploaded-files/admin/partials/dh-rename-uploaded-files-admin-display.php+81
    Trying to access array offset on value of type bool

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
Please take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/dh-rename-uploaded-files/admin/partials/dh-rename-uploaded-files-admin-display.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/dh-rename-uploaded-files/public/partials/dh-rename-uploaded-files-public-display.php:16

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=dh-rename-uploaded-files
    • > Network (severe)
    wp-content/plugins/dh-rename-uploaded-files/admin/webfonts/fa-brands-400.woff2 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=dh-rename-uploaded-files
    • > Network (severe)
    wp-content/plugins/dh-rename-uploaded-files/admin/webfonts/fa-brands-400.woff - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=dh-rename-uploaded-files
    • > Network (severe)
    wp-content/plugins/dh-rename-uploaded-files/admin/webfonts/fa-brands-400.ttf - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (All settings on WP Dashboard.)
The official readme.txt might help

dh-rename-uploaded-files/dh-rename-uploaded-files.php 92% from 13 tests

"DH - Rename Uploaded Files" version 3...'s main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Version: The version number should be digits and periods (ex. "1.0.3" instead of "3...")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin412 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP12196567374
JavaScript476229
CSS71179

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity4.14
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity1.81
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27.41%
▷ Public methods2177.78%
▷ Protected methods00.00%
▷ Private methods622.22%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png11.71KB6.70KB▼ 42.84%