84% wp-media-library-categories

Code Review | Media Library Categories

WordPress plugin Media Library Categories scored84%from 54 tests.

About plugin

  • Plugin page: wp-media-library-...
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Nov 12, 2013
  • Latest release: Jul 24, 2023
  • Number of updates: 183
  • Update frequency: every 19.4 days
  • Top authors: jeffrey-wp (100%)

Code review

54 tests

User reviews

51 reviews

Install metrics

20,000+ active /437,966 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
Installer ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼1.11ms] Passed 4 tests

This is a short check of server-side resources used by Media Library Categories
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1341.81 ▲1.04
Dashboard /wp-admin3.50 ▲0.1652.44 ▼1.17
Posts /wp-admin/edit.php3.61 ▲0.2251.01 ▲0.52
Add New Post /wp-admin/post-new.php6.09 ▲0.1690.89 ▼4.84
Media Library /wp-admin/upload.php3.43 ▲0.1642.47 ▲6.44
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=attachment3.4241.32

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
category_children
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Media Library Categories
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲5914.73 ▲0.201.93 ▲0.0943.59 ▲0.01
Dashboard /wp-admin2,198 ▲305.50 ▼0.0789.55 ▼0.7844.81 ▼13.31
Posts /wp-admin/edit.php2,106 ▲61.99 ▼0.0534.55 ▼8.2433.85 ▼6.18
Add New Post /wp-admin/post-new.php1,531 ▼323.60 ▲5.36642.08 ▲15.1661.90 ▼7.76
Media Library /wp-admin/upload.php1,472 ▲724.27 ▲0.0898.54 ▼10.9042.95 ▼3.56
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=attachment1,4612.1227.5836.19

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • category_children
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% 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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_CategoryDropdown' not found in wp-content/plugins/wp-media-library-categories/include/walkers.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Plugin Name: Please specify the plugin name on the first line ( === wp-media-library-categories === )
You can look at the official readme.txt

wp-media-library-categories/index.php 92% from 13 tests

The principal PHP file in "Media Library Categories" v. 2.0.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-media-library-categories.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin5,680 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript41,1973054,622
PHP2198171619
CSS4561439

PHP code Passed 2 tests

Analyzing 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.42
Average class complexity26.50
▷ Minimum class complexity2.00
▷ Maximum class complexity91.00
Average method complexity4.29
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods31
▷ Static methods13.23%
▷ Public methods31100.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

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin