88% organize-media-library

Code Review | Organize Media Library by Folders

WordPress plugin Organize Media Library by Folders scored 88% from 54 tests.

About plugin

  • Plugin page: organize-media-li...
  • Plugin version: 7.26
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.6
  • WordPress version: 5.9.2
  • First release: Mar 9, 2015
  • Latest release: Dec 31, 2020
  • Number of updates: 211
  • Update frequency: every 10.1 days
  • Top authors: Katsushi Kawamori (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

1,000+ active / 56,632 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.22MB] [CPU: ▼294.09ms] Passed 4 tests

Analyzing server-side resources used by Organize Media Library by Folders
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.3058.35 ▲12.36
Dashboard /wp-admin3.65 ▲0.2434.69 ▲1.49
Posts /wp-admin/edit.php3.88 ▲0.2339.74 ▲3.56
Add New Post /wp-admin/post-new.php7.11 ▲0.1394.90 ▼1,191.42
Media Library /wp-admin/upload.php3.71 ▲0.4135.23 ▲10.03
Folder Settings /wp-admin/upload.php?page=organizemedialibrary-settings3.4927.31

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 1 new option
New WordPress options
oml_dirs

Browser metrics Passed 4 tests

An overview of browser requirements for Organize Media Library by Folders
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,833 ▲11115.88 ▲0.205.82 ▼0.332.66 ▲0.18
Dashboard /wp-admin2,930 ▲696.14 ▼0.04116.94 ▼19.02156.56 ▼4.33
Posts /wp-admin/edit.php2,696 ▲23.23 ▲0.0066.11 ▲1.78143.50 ▲0.87
Add New Post /wp-admin/post-new.php1,711 ▼021.16 ▼0.38436.52 ▼14.76163.90 ▲2.85
Media Library /wp-admin/upload.php1,893 ▲1955.87 ▲0.37131.42 ▼11.60188.32 ▲1.52
Folder Settings /wp-admin/upload.php?page=organizemedialibrary-settings1,8032.7458.11121.33

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/upload.php?page=organizemedialibrary-settings
    • > Notice in wp-content/plugins/organize-media-library/lib/class-organizemedialibrary.php+410
    Trying to get property 'name' of non-object

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
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/organize-media-library/lib/class-organizemedialibraryadmin.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/organize-media-library/lib/class-organizemedialibrary.php:58
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/organize-media-library/lib/class-organizemedialibrary.php:58

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% 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
5 plugin tags: admin, directories, media library, media, folders

organize-media-library/organizemedialibrary.php 92% from 13 tests

The primary PHP file in "Organize Media Library by Folders" version 7.26 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("organize-media-library.php" instead of "organizemedialibrary.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin1,172 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP41963001,081
JavaScript3105891

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity72.50
▷ Minimum class complexity58.00
▷ Maximum class complexity87.00
Average method complexity5.47
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods31
▷ Static methods00.00%
▷ Public methods2580.65%
▷ Protected methods00.00%
▷ Private methods619.35%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.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
There are no PNG files in this plugin