90% clean-image-filenames

Code Review | Clean Image Filenames

WordPress plugin Clean Image Filenames scored90%from 54 tests.

About plugin

  • Plugin page: clean-image-filen...
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-6.3
  • WordPress version: 6.3.1
  • First release: Oct 3, 2014
  • Latest release: Aug 31, 2023
  • Number of updates: 50
  • Update frequency: every 65.1 days
  • Top authors: Upperdog (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

40,000+ active /233,620 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.84ms] Passed 4 tests

Analyzing server-side resources used by Clean Image Filenames
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0635.37 ▼2.57
Dashboard /wp-admin3.37 ▲0.0246.40 ▼15.87
Posts /wp-admin/edit.php3.42 ▲0.0648.26 ▲3.59
Add New Post /wp-admin/post-new.php5.95 ▲0.0695.34 ▼5.06
Media Library /wp-admin/upload.php3.29 ▲0.0635.52 ▲0.14

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 8 new options
New WordPress options
clean_image_filenames_plugin_version
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
clean_image_filenames_mime_types

Browser metrics Passed 4 tests

This is an overview of browser requirements for Clean Image Filenames
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.32 ▼0.321.57 ▼0.5439.94 ▲1.00
Dashboard /wp-admin2,189 ▲155.59 ▲0.0187.70 ▼2.4242.09 ▼1.67
Posts /wp-admin/edit.php2,097 ▼61.95 ▼0.0641.54 ▲3.5035.19 ▼0.38
Add New Post /wp-admin/post-new.php1,526 ▼023.11 ▼0.17593.51 ▼91.9752.26 ▼12.01
Media Library /wp-admin/upload.php1,400 ▲34.23 ▲0.1192.33 ▼13.9142.75 ▼2.10

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: images, media, files, sanitize, upload

clean-image-filenames/clean-image-filenames.php Passed 13 tests

The entry point to "Clean Image Filenames" version 1.4 is a PHP file that has certain tags in its header comment area
136 characters long description:
This plugin automatically converts language accent characters to non-accent characters in filenames when uploading to the media library.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected371 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP247167332
PO File16639

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity1.91
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin