79% media-library-organizer

Code Review | Media Library Organizer

WordPress plugin Media Library Organizer scored79%from 54 tests.

About plugin

  • Plugin page: media-library-org...
  • Plugin version: 1.6.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Aug 14, 2017
  • Latest release: Aug 4, 2023
  • Number of updates: 96
  • Update frequency: every 22.8 days
  • Top authors: wpmedialibrary (95.83%)optimole (5.21%)

Code review

54 tests

User reviews

77 reviews

Install metrics

10,000+ active /178,402 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.93MB] [CPU: ▲2.07ms] Passed 4 tests

Analyzing server-side resources used by Media Library Organizer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.11 ▲0.6445.04 ▲7.79
Dashboard /wp-admin4.34 ▲1.0450.82 ▲3.26
Posts /wp-admin/edit.php4.39 ▲1.0350.56 ▲6.80
Add New Post /wp-admin/post-new.php6.95 ▲1.0689.03 ▼9.58
Media Library /wp-admin/upload.php4.24 ▲1.0147.62 ▲13.48
Settings /wp-admin/admin.php?page=media-library-organizer4.2439.85
Import & Export /wp-admin/admin.php?page=media-library-organizer-import-export4.1939.53
Media Categories /wp-admin/edit-tags.php?taxonomy=mlo-category&post_type=attachment4.2040.04

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 442 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
media-library-organizer-version
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
media-library-organizer-review-request
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Media Library Organizer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲8713.20 ▼1.392.02 ▲0.3143.98 ▲6.22
Dashboard /wp-admin2,239 ▲474.87 ▼0.03100.59 ▼10.1737.95 ▼5.19
Posts /wp-admin/edit.php2,122 ▲361.99 ▼0.0537.04 ▲1.3835.36 ▲2.37
Add New Post /wp-admin/post-new.php1,556 ▲1217.44 ▼0.47662.78 ▲41.0562.52 ▲8.61
Media Library /wp-admin/upload.php1,660 ▲2725.31 ▲1.10117.38 ▲16.9244.03 ▲0.09
Settings /wp-admin/admin.php?page=media-library-organizer1,6282.2432.9249.00
Import & Export /wp-admin/admin.php?page=media-library-organizer-import-export1,0112.2527.0936.52
Media Categories /wp-admin/edit-tags.php?taxonomy=mlo-category&post_type=attachment1,2982.1425.6426.83

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 8 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • media-library-organizer-review-request
    • widget_recent-posts
    • media-library-organizer-version

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/media-library-organizer/views/admin/media-views.php
  • 43× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/media-library-organizer/views/admin/settings.php:15
    • > PHP Notice
      Undefined variable: addon_tabs in wp-content/plugins/media-library-organizer/views/admin/settings-general.php on line 32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/media-library-organizer/media-library-organizer.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/media-library-organizer/addons/tree-view/class-media-library-organizer-tree-view.php:62
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/media-library-organizer/views/admin/import-filebird.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/media-library-organizer/views/admin/tinymce/fields/row.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/media-library-organizer/views/admin/import-wicked-folders.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/media-library-organizer/addons/tree-view/views/admin/settings.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/media-library-organizer/views/admin/tinymce/modal-missing.php:15
    • > PHP Notice
      Undefined variable: field in wp-content/plugins/media-library-organizer/views/admin/tinymce/fields/field.php on line 32

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: images, media categories, media library, organizer, media tags

media-library-organizer/media-library-organizer.php Passed 13 tests

The principal PHP file in "Media Library Organizer" v. 1.6.0 is loaded by WordPress automatically on each request
59 characters long description:
Organize and Search your Media Library, quicker and easier.

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
Everything looks great! No dangerous files found in this plugin24,071 lines of code in 437 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript622,2465,18914,531
PHP672,1035,4525,661
Sass830202,672
SVG29300614
PO File1187275559
XML191129
CSS5005

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity17.79
▷ Minimum class complexity1.00
▷ Maximum class complexity108.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes34
▷ Abstract classes00.00%
▷ Concrete classes34100.00%
▷ Final classes00.00%
Methods313
▷ Static methods20.64%
▷ Public methods27286.90%
▷ Protected methods00.00%
▷ Private methods4113.10%
Functions8
▷ Named functions787.50%
▷ Anonymous functions112.50%
Constants4
▷ Global constants4100.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 files were detected