78% automatic-file-renamer

Code Review | Automatic File Renamer

WordPress plugin Automatic File Renamer scored78%from 54 tests.

About plugin

  • Plugin page: automatic-file-re...
  • Plugin version: 0.2.7
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3.1
  • WordPress version: 6.3.1
  • First release: Feb 15, 2022
  • Latest release: Sep 23, 2023
  • Number of updates: 36
  • Update frequency: every 16.3 days
  • Top authors: cellophile (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,420 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.17ms] Passed 4 tests

A check of server-side resources used by Automatic File Renamer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0736.94 ▼7.69
Dashboard /wp-admin3.37 ▲0.0656.40 ▲3.61
Posts /wp-admin/edit.php3.42 ▲0.0649.89 ▼3.51
Add New Post /wp-admin/post-new.php5.95 ▲0.06100.21 ▼5.08
Media Library /wp-admin/upload.php3.29 ▲0.0640.24 ▲3.83
Automatic File Renamer /wp-admin/upload.php?page=automatic-file-renamer/Admin/AFR-Admin-Panel.php3.3140.52

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 37 new files
Database: no new tables, 11 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
AFR_suffixe
can_compress_scripts
AFR_Ou_Rediriger
AFR_activation
AFR_prefixe
widget_recent-posts
AFR_redirection
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Automatic File Renamer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.38 ▲0.072.67 ▲0.3441.85 ▼6.60
Dashboard /wp-admin2,199 ▲195.56 ▼0.1185.14 ▼4.3144.65 ▼1.57
Posts /wp-admin/edit.php2,104 ▲42.01 ▼0.0040.22 ▼2.1638.40 ▲1.90
Add New Post /wp-admin/post-new.php1,536 ▼123.03 ▲4.91629.57 ▼16.1753.86 ▼14.99
Media Library /wp-admin/upload.php1,398 ▲14.22 ▲0.0198.37 ▼4.1740.63 ▼3.83
Automatic File Renamer /wp-admin/upload.php?page=automatic-file-renamer/Admin/AFR-Admin-Panel.php1,0012.0428.6144.58

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% 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
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/automatic-file-renamer/uninstall.php
    • > /wp-content/plugins/automatic-file-renamer/Admin/AFR-Admin-Panel.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/automatic-file-renamer/Admin/AFR-Admin-functions.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/automatic-file-renamer/AFR-config.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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:
  • Tags: You are using too many tags: 17 tag instead of maximum 10
  • Donate link: Invalid URI ("")
The official readme.txt might help

automatic-file-renamer/AFR-init.php 92% from 13 tests

The primary PHP file in "Automatic File Renamer" version 0.2.7 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("automatic-file-renamer.php" instead of "AFR-init.php")

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
Everything looks great! No dangerous files found in this plugin1,045 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PO File6179212529
PHP810878516

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.56
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%
Functions13
▷ Named functions1184.62%
▷ Anonymous functions215.38%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin