84% file-renaming-on-upload

Code Review | File Renaming on Upload

WordPress plugin File Renaming on Upload scored 84% from 54 tests.

About plugin

  • Plugin page: file-renaming-on-...
  • Plugin version: 2.5.6
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-6.3
  • WordPress version: 6.3.1
  • First release: Jul 19, 2013
  • Latest release: Sep 25, 2023
  • Number of updates: 123
  • Update frequency: every 30.2 days
  • Top authors: Karzin (93.5%)wpcodefactory (5.69%)deployer (2.44%)

Code review

54 tests

User reviews

38 reviews

Install metrics

10,000+ active / 176,019 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.70MB] [CPU: ▲4.21ms] Passed 4 tests

A check of server-side resources used by File Renaming on Upload
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.96 ▲0.5045.39 ▲3.80
Dashboard /wp-admin4.08 ▲0.7856.67 ▲8.55
Posts /wp-admin/edit.php4.19 ▲0.8459.29 ▲11.31
Add New Post /wp-admin/post-new.php6.64 ▲0.7590.25 ▼6.84
Media Library /wp-admin/upload.php3.98 ▲0.7544.83 ▲11.90
File renaming /wp-admin/options-general.php?page=file-renaming-on-upload3.9843.11

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 56 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-comments
frou_filenaming_rules_opt
db_upgraded
can_compress_scripts
widget_theysaidso_widget
frou_advanced_opt
widget_recent-posts
theysaidso_admin_options
frou_general_opt

Browser metrics Passed 4 tests

An overview of browser requirements for File Renaming on Upload
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,958 ▲22315.33 ▲1.041.81 ▲0.1142.62 ▼5.90
Dashboard /wp-admin2,367 ▲1796.63 ▲0.74135.82 ▲25.9445.61 ▲2.42
Posts /wp-admin/edit.php2,267 ▲1783.50 ▲1.4456.74 ▲17.2834.95 ▼0.72
Add New Post /wp-admin/post-new.php1,534 ▲223.17 ▼0.20735.59 ▲109.6440.23 ▼13.61
Media Library /wp-admin/upload.php1,403 ▲184.34 ▲0.0380.81 ▼16.1639.41 ▼2.77
File renaming /wp-admin/options-general.php?page=file-renaming-on-upload1,4513.6250.7158.99

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options were found after uninstall: 9 options
    • frou_advanced_opt
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • frou_filenaming_rules_opt
    • frou_general_opt
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/file-renaming-on-upload/vendor/tareq1988/wordpress-settings-api-class/example/oop-example.php' (include_path='.:/usr/share/php') in wp-content/plugins/file-renaming-on-upload/vendor/tareq1988/wordpress-settings-api-class/plugin.php on line 12
    • > PHP Warning
      require_once(wp-content/plugins/file-renaming-on-upload/vendor/tareq1988/wordpress-settings-api-class/example/oop-example.php): failed to open stream: No such file or directory in wp-content/plugins/file-renaming-on-upload/vendor/tareq1988/wordpress-settings-api-class/plugin.php on line 12

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 Passed 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
7 plugin tags: rename, characters, renaming, upload, file...

file-renaming-on-upload/file-renaming-on-upload.php Passed 13 tests

The main PHP file in "File Renaming on Upload" ver. 2.5.6 adds more information about the plugin and also serves as the entry point for this plugin
99 characters long description:
Fixes file uploads with accents and special characters by renaming them. It also improves your SEO.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin3,665 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
PHP378421,9653,124
JSON500263
PO File16163161
Markdown117066
YAML17623
XML29321
Bourne Shell1017

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity14.37
▷ Minimum class complexity1.00
▷ Maximum class complexity69.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces13
Interfaces0
Traits0
Classes27
▷ Abstract classes00.00%
▷ Concrete classes27100.00%
▷ Final classes00.00%
Methods202
▷ Static methods2311.39%
▷ Public methods18491.09%
▷ Protected methods115.45%
▷ Private methods73.47%
Functions12
▷ Named functions541.67%
▷ Anonymous functions758.33%
Constants0
▷ Global constants00.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