84% media-auto-hash-rename

Code Review | Media Auto Hash Rename

WordPress plugin Media Auto Hash Rename scored84%from 54 tests.

About plugin

  • Plugin page: media-auto-hash-r...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 6.3.1
  • First release: Mar 30, 2019
  • Latest release: Aug 11, 2021
  • Number of updates: 9
  • Update frequency: every 96.4 days
  • Top authors: Sparanoid (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /1,432 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.00MB] [CPU: ▼6.20ms] Passed 4 tests

This is a short check of server-side resources used by Media Auto Hash Rename
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.72 ▼2.00
Dashboard /wp-admin3.32 ▼0.0340.24 ▼15.15
Posts /wp-admin/edit.php3.37 ▲0.0147.98 ▲3.55
Add New Post /wp-admin/post-new.php5.90 ▲0.0177.35 ▼6.29
Media Library /wp-admin/upload.php3.24 ▲0.0133.40 ▼1.36

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Media Auto Hash Rename: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.61 ▼0.791.55 ▼0.3639.07 ▼5.54
Dashboard /wp-admin2,209 ▲175.91 ▲0.99130.21 ▲19.7152.55 ▲6.88
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0235.11 ▲0.5030.42 ▼5.91
Add New Post /wp-admin/post-new.php1,533 ▲1923.36 ▲5.86647.63 ▼60.1556.86 ▲5.69
Media Library /wp-admin/upload.php1,391 ▲64.18 ▼0.0197.44 ▼7.3742.89 ▼2.51

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/media-auto-hash-rename/media-auto-hash-rename.php:47

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: rename, file, renaming, administration, media...

media-auto-hash-rename/media-auto-hash-rename.php 85% from 13 tests

The entry point to "Media Auto Hash Rename" version 1.0.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
No dangerous file extensions were detected26 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP161626

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.61
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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