68% wp-media-folders

Code Review | WP Media folders

WordPress plugin WP Media folders scored68%from 54 tests.

About plugin

  • Plugin page: wp-media-folders
  • Plugin version: 1.1.10
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-5.4
  • WordPress version: 6.3.1
  • First release: Jun 27, 2017
  • Latest release: Sep 6, 2021
  • Number of updates: 34
  • Update frequency: every 45.1 days
  • Top authors: dbarrere (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

5,000+ active /69,152 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.96ms] Passed 4 tests

A check of server-side resources used by WP Media folders
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.38 ▼6.51
Dashboard /wp-admin3.47 ▲0.1648.80 ▼6.84
Posts /wp-admin/edit.php3.60 ▲0.2453.34 ▲2.78
Add New Post /wp-admin/post-new.php5.62 ▼0.2779.75 ▼16.64
Media Library /wp-admin/upload.php3.38 ▲0.1533.60 ▼5.83
WP Media Folders /wp-admin/options-general.php?page=wp-media-folders-settings3.4639.63

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 11 new files
Database: 1 new table, 10 new options
New tables
wp_wpmfs_queue
New WordPress options
wp-media-folders-version
wp-media-folders-options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
wp-media-folders-tables
wp-media-folders-token
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for WP Media folders
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲6114.22 ▼0.181.76 ▲0.0045.60 ▼0.87
Dashboard /wp-admin2,225 ▲455.61 ▼0.0692.09 ▼7.3045.90 ▼2.01
Posts /wp-admin/edit.php2,133 ▲332.05 ▲0.0542.47 ▲4.7438.24 ▼0.98
Add New Post /wp-admin/post-new.php1,555 ▲2923.40 ▲0.39620.92 ▼62.6564.48 ▲13.35
Media Library /wp-admin/upload.php1,433 ▲364.30 ▲0.14104.55 ▲1.4843.64 ▼1.14
WP Media Folders /wp-admin/options-general.php?page=wp-media-folders-settings1,5702.2426.9135.91

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_wpmfs_queue
  • This plugin does not fully uninstall, leaving 10 options in the database
    • wp-media-folders-options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • wp-media-folders-tables
    • wp-media-folders-version
    • widget_recent-comments
    • wp-media-folders-token

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=wp-media-folders-settings
    • > User notice in wp-includes/functions.php+5905
    Function WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)

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
The following issues need your attention
  • 6× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-media-folders/classes/queue.php
    • > /wp-content/plugins/wp-media-folders/settings_view.php
    • > /wp-content/plugins/wp-media-folders/classes/debug.php
    • > /wp-content/plugins/wp-media-folders/classes/helper.php
    • > /wp-content/plugins/wp-media-folders/classes/wpmf.php
    • > /wp-content/plugins/wp-media-folders/wp-media-folders.php

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention: Please take inspiration from this readme.txt

wp-media-folders/wp-media-folders.php 92% from 13 tests

The principal PHP file in "WP Media folders" v. 1.1.10 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

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
There were no executable files found in this plugin1,256 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP72373751,126
JavaScript26172
CSS114058

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity30.60
▷ Minimum class complexity8.00
▷ Maximum class complexity99.00
Average method complexity7.10
▷ Minimum method complexity1.00
▷ Maximum method complexity67.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods25
▷ Static methods2184.00%
▷ Public methods1872.00%
▷ Protected methods14.00%
▷ Private methods624.00%
Functions22
▷ Named functions29.09%
▷ Anonymous functions2090.91%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin