84% media-file-renamer

Code Review | Media File Renamer: Rename Files (Manual, Auto & AI)

WordPress plugin Media File Renamer: Rename Files (Manual, Auto & AI) scored84%from 54 tests.

About plugin

  • Plugin page: media-file-renamer
  • Plugin version: 5.7.5
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4
  • WordPress version: 6.3.1
  • First release: Jan 27, 2011
  • Latest release: Nov 29, 2023
  • Number of updates: 404
  • Update frequency: every 11.6 days
  • Top authors: TigrouMeow (100%)

Code review

54 tests

User reviews

388 reviews

Install metrics

40,000+ active /2,254,744 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.23ms] Passed 4 tests

This is a short check of server-side resources used by Media File Renamer: Rename Files (Manual, Auto & AI)
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0441.90 ▼0.22
Dashboard /wp-admin3.34 ▼0.0053.83 ▼6.45
Posts /wp-admin/edit.php3.46 ▲0.1055.13 ▲5.56
Add New Post /wp-admin/post-new.php5.93 ▲0.04100.45 ▼7.80
Media Library /wp-admin/upload.php3.27 ▲0.0442.04 ▲6.66
Renamer /wp-admin/upload.php?page=mfrh_dashboard3.2441.06
Dashboard /wp-admin/admin.php?page=meowapps-main-menu3.4458.44
Renamer /wp-admin/admin.php?page=mfrh_settings3.2437.29

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Media File Renamer: Rename Files (Manual, Auto & AI)
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,872 ▲8514.15 ▼0.572.16 ▲0.3239.93 ▼5.66
Dashboard /wp-admin2,252 ▲715.58 ▼0.1395.68 ▼10.8243.32 ▼4.17
Posts /wp-admin/edit.php2,157 ▲572.02 ▲0.0239.87 ▼0.3835.02 ▼1.02
Add New Post /wp-admin/post-new.php1,574 ▲3823.55 ▲0.41617.93 ▼49.5653.84 ▼2.87
Media Library /wp-admin/upload.php1,477 ▲775.65 ▲1.45116.70 ▲11.2640.14 ▼3.64
Renamer /wp-admin/upload.php?page=mfrh_dashboard1,2235.80160.2148.80
Dashboard /wp-admin/admin.php?page=meowapps-main-menu5,6634.70108.7673.75
Renamer /wp-admin/admin.php?page=mfrh_settings1,4825.86108.8344.84

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • mfrh_options

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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      require_once(): Failed opening required 'MFRH_PATH/classes/api.php' (include_path='.:/usr/share/php') in wp-content/plugins/media-file-renamer/classes/init.php on line 37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/media-file-renamer/classes/plugins/beaverbuilder.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/media-file-renamer/classes/plugins/elementor.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/media-file-renamer/media-file-renamer.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'MeowCommon_Admin' not found in wp-content/plugins/media-file-renamer/classes/admin.php:3
    • > PHP Warning
      require_once(MFRH_PATH/classes/api.php): failed to open stream: No such file or directory in wp-content/plugins/media-file-renamer/classes/init.php on line 37
    • > PHP Warning
      Use of undefined constant MFRH_PATH - assumed 'MFRH_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/media-file-renamer/classes/init.php on line 37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/media-file-renamer/classes/plugins/wpml.php:5

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

media-file-renamer/media-file-renamer.php 92% from 13 tests

"Media File Renamer: Rename Files (Manual, Auto & AI)" version 5.7.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 188 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected3,406 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP215276173,169
JavaScript3124237

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity43.83
▷ Minimum class complexity3.00
▷ Maximum class complexity178.00
Average method complexity4.26
▷ Minimum method complexity1.00
▷ Maximum method complexity64.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods160
▷ Static methods1811.25%
▷ Public methods15898.75%
▷ Protected methods00.00%
▷ Private methods21.25%
Functions27
▷ Named functions1451.85%
▷ Anonymous functions1348.15%
Constants7
▷ Global constants7100.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
No PNG images were found in this plugin