68% media-library-tools

Code Review | Media Library Tools - Media File Rename, Find Unused Media File, Support SVG , Edit Media Content

WordPress plugin Media Library Tools - Media File Rename, Find Unused Media File, Support SVG , Edit Media Content scored68%from 54 tests.

About plugin

  • Plugin page: media-library-tools
  • Plugin version: 1.2.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.4
  • WordPress version: 6.3.1
  • First release: Mar 7, 2023
  • Latest release: Nov 26, 2023
  • Number of updates: 83
  • Update frequency: every 3.2 days
  • Top authors: tinysolution (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /3,032 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.57MB] [CPU: ▼4.02ms] Passed 4 tests

This is a short check of server-side resources used by Media Library Tools - Media File Rename, Find Unused Media File, Support SVG , Edit Media Content
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.03 ▲0.5743.99 ▲1.13
Dashboard /wp-admin3.88 ▲0.5350.98 ▼11.81
Posts /wp-admin/edit.php3.93 ▲0.5750.67 ▲1.48
Add New Post /wp-admin/post-new.php6.56 ▲0.6788.43 ▼6.88
Media Library /wp-admin/upload.php3.85 ▲0.6239.32 ▲5.56
Pricing /wp-admin/upload.php?page=tsmlt-get-pro3.7137.13
Category /wp-admin/edit-tags.php?taxonomy=tsmlt_category&post_type=attachment3.8037.23
Media Tools /wp-admin/upload.php?page=tsmlt-media-tools3.7132.46

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 33 new files
Database: 1 new table, 10 new options
New tables
wp_tsmlt_unlisted_file
New WordPress options
can_compress_scripts
tsmlt_settings
widget_theysaidso_widget
theysaidso_admin_options
tsmlt_plugin_activation_time
widget_recent-comments
tsmlt_get_directory_list
tsmlt_plugin_version
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Media Library Tools - Media File Rename, Find Unused Media File, Support SVG , Edit Media Content
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲8614.23 ▼0.031.63 ▼0.0537.17 ▼5.93
Dashboard /wp-admin2,247 ▲695.62 ▼0.0894.91 ▼22.7088.89 ▲42.41
Posts /wp-admin/edit.php2,162 ▲622.10 ▲0.1438.50 ▲0.2138.76 ▲1.90
Add New Post /wp-admin/post-new.php1,575 ▲4922.69 ▼0.57690.83 ▲42.3355.04 ▲2.75
Media Library /wp-admin/upload.php1,455 ▲524.20 ▲0.04103.29 ▲5.9868.30 ▲23.88
Pricing /wp-admin/upload.php?page=tsmlt-get-pro1,4592.0832.72175.98
Category /wp-admin/edit-tags.php?taxonomy=tsmlt_category&post_type=attachment1,3352.2731.5439.75
Media Tools /wp-admin/upload.php?page=tsmlt-media-tools1,12014.05360.5864.26

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie tables detected upon uninstall: 1 table
    • wp_tsmlt_unlisted_file
  • The uninstall procedure has failed, leaving 10 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • tsmlt_plugin_activation_time
    • theysaidso_admin_options
    • tsmlt_get_directory_list
    • tsmlt_settings
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • tsmlt_plugin_version

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
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
The following issues need your attention
  • 9× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/media-library-tools/app/Helpers/Fns.php
    • > /wp-content/plugins/media-library-tools/app/Tsmlt.php
    • > /wp-content/plugins/media-library-tools/app/Controllers/Admin/SubMenu.php
    • > /wp-content/plugins/media-library-tools/app/Controllers/Notice/BlackFriday.php
    • > /wp-content/plugins/media-library-tools/app/Controllers/Installation.php
    • > /wp-content/plugins/media-library-tools/app/Controllers/Dependencies.php
    • > /wp-content/plugins/media-library-tools/app/Traits/SingletonTrait.php
    • > /wp-content/plugins/media-library-tools/app/Controllers/AssetsController.php
    • > /wp-content/plugins/media-library-tools/media-library-tools.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Trait 'TinySolutions\\mlt\\Traits\\SingletonTrait' not found in wp-content/plugins/media-library-tools/app/Controllers/Admin/Api.php on line 10
    • > PHP Fatal error
      Trait 'TinySolutions\\mlt\\Traits\\SingletonTrait' not found in wp-content/plugins/media-library-tools/app/Controllers/Admin/RegisterPostAndTax.php on line 12
    • > PHP Fatal error
      Trait 'TinySolutions\\mlt\\Traits\\SingletonTrait' not found in wp-content/plugins/media-library-tools/app/Controllers/Notice/Review.php on line 10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 28 tag instead of maximum 10
The official readme.txt might help

media-library-tools/media-library-tools.php 85% from 13 tests

Analyzing the main PHP file in "Media Library Tools - Media File Rename, Find Unused Media File, Support SVG , Edit Media Content" version 1.2.1
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 141 characters long)
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected3,079 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP246401,0393,062
JavaScript105411
JSON1005
CSS1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity19.94
▷ Minimum class complexity1.00
▷ Maximum class complexity96.00
Average method complexity3.58
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces8
Interfaces0
Traits1
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes16.25%
Methods126
▷ Static methods5039.68%
▷ Public methods11591.27%
▷ Protected methods10.79%
▷ Private methods107.94%
Functions10
▷ Named functions110.00%
▷ Anonymous functions990.00%
Constants9
▷ Global constants666.67%
▷ Class constants333.33%
▷ Public constants3100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/media-library-tools-icon-128x128.png6.82KB3.46KB▼ 49.19%