84% unique-uploaded-media-name

Code Review | Unique Uploaded Media Name

WordPress plugin Unique Uploaded Media Name scored84%from 54 tests.

About plugin

  • Plugin page: unique-uploaded-m...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.2.1
  • WordPress version: 6.3.1
  • First release: Mar 7, 2018
  • Latest release: May 29, 2019
  • Number of updates: 7
  • Update frequency: every 64.0 days
  • Top authors: sharkar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /1,243 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
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.02ms] Passed 4 tests

A check of server-side resources used by Unique Uploaded Media Name
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0136.82 ▼4.03
Dashboard /wp-admin3.31 ▲0.0041.87 ▼14.03
Posts /wp-admin/edit.php3.36 ▲0.0048.11 ▲0.30
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.92 ▼2.30
Media Library /wp-admin/upload.php3.23 ▲0.0036.80 ▲2.82

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Unique Uploaded Media Name
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.24 ▼1.184.60 ▲2.5840.80 ▼5.52
Dashboard /wp-admin2,206 ▲214.91 ▲0.01106.02 ▲1.9743.25 ▲0.78
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0139.17 ▼1.2636.25 ▲1.67
Add New Post /wp-admin/post-new.php1,533 ▲1323.20 ▼0.04592.37 ▼90.4450.83 ▲2.02
Media Library /wp-admin/upload.php1,382 ▼64.16 ▼0.0897.73 ▼10.4742.39 ▼2.98

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/unique-uploaded-media-name/unique-uploaded-media-name.php:109

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

unique-uploaded-media-name/unique-uploaded-media-name.php Passed 13 tests

"Unique Uploaded Media Name" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
62 characters long description:
Unique uploaded media names by adding some extra random string

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected86 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1131086

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods2100.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.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
There are no PNG files in this plugin