78% phoenix-media-rename

Code Review | Phoenix Media Rename

WordPress plugin Phoenix Media Rename scored78%from 54 tests.

About plugin

  • Plugin page: phoenix-media-rename
  • Plugin version: 3.11.5
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Aug 29, 2016
  • Latest release: Nov 22, 2023
  • Number of updates: 237
  • Update frequency: every 11.2 days
  • Top authors: crossi72 (100%)

Code review

54 tests

User reviews

59 reviews

Install metrics

40,000+ active /1,027,674 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 gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▲0.40ms] Passed 4 tests

This is a short check of server-side resources used by Phoenix Media Rename
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0133.54 ▼3.10
Dashboard /wp-admin3.35 ▲0.0550.89 ▲1.24
Posts /wp-admin/edit.php3.40 ▲0.0548.88 ▼1.28
Add New Post /wp-admin/post-new.php5.93 ▲0.0594.80 ▲12.80
Media Library /wp-admin/upload.php3.28 ▲0.0540.27 ▲4.72
Phoenix Media Rename /wp-admin/options-general.php?page=pmr-setting-admin3.2430.98

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 20 new files
Database: 1 new table, 11 new options
New tables
wp_pmr_status
New WordPress options
can_compress_scripts
Activated_phoenix_media_rename
widget_recent-comments
pmr_update_db_table
db_upgraded
pmr_options
pmr_table_installed
widget_theysaidso_widget
pmr_db_version
theysaidso_admin_options
...

Browser metrics Passed 4 tests

Checking browser requirements for Phoenix Media Rename
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3214.19 ▼0.091.68 ▲0.1336.51 ▼3.00
Dashboard /wp-admin2,202 ▲285.51 ▼0.0796.52 ▼7.2842.81 ▲0.11
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0641.91 ▲2.0940.84 ▲7.46
Add New Post /wp-admin/post-new.php1,529 ▼223.29 ▲0.46660.78 ▲61.2558.32 ▲8.22
Media Library /wp-admin/upload.php1,411 ▲84.25 ▲0.05107.10 ▲6.8346.38 ▲1.52
Phoenix Media Rename /wp-admin/options-general.php?page=pmr-setting-admin9282.1322.9529.80

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 11 options
    • widget_recent-comments
    • Activated_phoenix_media_rename
    • widget_theysaidso_widget
    • can_compress_scripts
    • pmr_table_installed
    • pmr_db_version
    • pmr_options
    • widget_recent-posts
    • db_upgraded
    • pmr_update_db_table
    • ...

Smoke tests 50% 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)
The smoke test was a success, however most plugin functionality was not tested

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
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/phoenix-media-rename/classes/class-pmr-settings.php:529
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/phoenix-media-rename/classes/class-plugins.php:50
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/phoenix-media-rename/classes/class-plugins.php:50

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=pmr-setting-admin
    • > Network (severe)
    wp-content/plugins/phoenix-media-rename/classes/js/options.min.js?ver=1.0.0 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #4 (screenshot-1.jpg), #5 (screenshot-2.jpg), #6 (screenshot-3.jpg)
Please take inspiration from this readme.txt

phoenix-media-rename/phoenix-media-rename.php Passed 13 tests

The entry point to "Phoenix Media Rename" version 3.11.5 is a PHP file that has certain tags in its header comment area
92 characters long description:
The Phoenix Media Rename plugin allows you to simply rename your media files, once uploaded.

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 plugin1,712 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP74308811,609
JavaScript4241295
CSS1008

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity24.00
▷ Minimum class complexity1.00
▷ Maximum class complexity95.00
Average method complexity3.07
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes222.22%
▷ Concrete classes777.78%
▷ Final classes00.00%
Methods100
▷ Static methods4444.00%
▷ Public methods8181.00%
▷ Protected methods00.00%
▷ Private methods1919.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants24
▷ Global constants2083.33%
▷ Class constants416.67%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin