84% unpredictable-image-filenames

Code Review | Unpredictable Image Filenames

WordPress plugin Unpredictable Image Filenames scored 84% from 54 tests.

About plugin

  • Plugin page: unpredictable-ima...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.7
  • WordPress version: 6.3.1
  • First release: May 27, 2016
  • Latest release: May 27, 2016
  • Number of updates: 3
  • Update frequency: every 64.7 days
  • Top authors: cfinke (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 679 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.01MB] [CPU: ▼6.65ms] Passed 4 tests

Server-side resources used by Unpredictable Image Filenames
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.63 ▼5.21
Dashboard /wp-admin3.31 ▲0.0148.71 ▲3.81
Posts /wp-admin/edit.php3.36 ▲0.0142.99 ▼8.91
Add New Post /wp-admin/post-new.php5.89 ▲0.0183.81 ▼13.62
Media Library /wp-admin/upload.php3.24 ▲0.0136.93 ▲1.15

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Unpredictable Image Filenames: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.30 ▼1.081.75 ▼0.3346.42 ▼3.75
Dashboard /wp-admin2,203 ▲155.82 ▲0.9196.77 ▼22.3042.39 ▼2.02
Posts /wp-admin/edit.php2,089 ▲31.99 ▼0.0233.58 ▼2.9033.11 ▼0.32
Add New Post /wp-admin/post-new.php1,528 ▲918.35 ▼4.77631.31 ▼0.9862.34 ▲2.02
Media Library /wp-admin/upload.php1,388 ▲64.14 ▼0.1494.11 ▼3.4740.69 ▼2.09

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% 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 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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/unpredictable-image-filenames/unpredictable-image-filenames.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Contributors: The plugin contributors field is missing
You can take inspiration from this readme.txt

unpredictable-image-filenames/unpredictable-image-filenames.php 92% from 13 tests

The entry point to "Unpredictable Image Filenames" version 1.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 141 characters long)

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
Success! There were no dangerous files found in this plugin22 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16922

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.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%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin