89% media-folders-lite

Code Review | Media Folders Lite

WordPress plugin Media Folders Lite scored 89% from 54 tests.

About plugin

  • Plugin page: media-folders-lite
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 28, 2022
  • Latest release: Jul 15, 2023
  • Number of updates: 18
  • Update frequency: every 24.6 days
  • Top authors: jbulies (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active / 1,165 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.08ms] Passed 4 tests

Analyzing server-side resources used by Media Folders Lite
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0535.81 ▼15.43
Dashboard /wp-admin3.35 ▲0.0549.68 ▼0.56
Posts /wp-admin/edit.php3.40 ▲0.0550.02 ▲2.97
Add New Post /wp-admin/post-new.php5.88 ▼0.0196.20 ▲4.71
Media Library /wp-admin/upload.php3.27 ▲0.0542.19 ▲7.47

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
mediafolders_option
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Media Folders Lite
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,864 ▲9313.26 ▼1.031.73 ▼0.3038.39 ▼5.35
Dashboard /wp-admin2,253 ▲714.88 ▼0.93103.15 ▼2.6241.67 ▲0.86
Posts /wp-admin/edit.php2,129 ▲402.01 ▲0.0038.97 ▲3.7338.83 ▲2.59
Add New Post /wp-admin/post-new.php1,750 ▲21724.68 ▲1.45595.06 ▼67.8432.58 ▼23.59
Media Library /wp-admin/upload.php1,468 ▲894.30 ▲0.1399.55 ▼7.6441.76 ▼2.82

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • mediafolders_option
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Tags: There are too many tags (12 tag instead of maximum 10)
  • Requires php: Version not formatted correctly
  • Requires at least: Version not formatted correctly
The official readme.txt is a good inspiration

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

The main PHP file in "Media Folders Lite" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("media-folders-lite.php" instead of "media-folders.php")

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
Success! There were no dangerous files found in this plugin663 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP68452335
CSS1210145
JavaScript21014105
PO File1252778

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity5.40
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions222.22%
▷ Anonymous functions777.78%
Constants7
▷ Global constants7100.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
PNG images were not found in this plugin