79% media-folder

Code Review | Media Folder

WordPress plugin Media Folder scored79%from 54 tests.

About plugin

  • Plugin page: media-folder
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8
  • WordPress version: 6.3.1
  • First release: Jun 18, 2015
  • Latest release: Dec 21, 2016
  • Number of updates: 11
  • Update frequency: every 71.9 days
  • Top authors: kingdomcreation (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /11,423 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

An overview of server-side resources used by Media Folder
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2043.71 ▼2.00
Dashboard /wp-admin3.56 ▲0.2654.10 ▲4.19
Posts /wp-admin/edit.php3.61 ▲0.2648.11 ▼3.34
Add New Post /wp-admin/post-new.php6.10 ▲0.2289.40 ▼16.32
Media Library /wp-admin/upload.php3.42 ▲0.1944.53 ▲6.77
Media Folders /wp-admin/edit.php?post_type=folder3.4842.21
Add Folder /wp-admin/post-new.php?post_type=folder3.5649.79
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=folder3.4236.33

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
category_children
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Media Folder
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,904 ▲14313.52 ▼1.127.95 ▲6.3442.12 ▲3.75
Dashboard /wp-admin2,230 ▲505.65 ▲0.0894.26 ▼5.3342.47 ▼2.94
Posts /wp-admin/edit.php2,135 ▲352.16 ▲0.1735.56 ▼4.3334.18 ▼3.32
Add New Post /wp-admin/post-new.php1,553 ▲2723.19 ▼0.04651.90 ▼46.9258.90 ▲1.42
Media Library /wp-admin/upload.php1,435 ▲354.08 ▼0.15101.09 ▼14.8342.86 ▼5.41
Media Folders /wp-admin/edit.php?post_type=folder1,1632.6450.0029.06
Add Folder /wp-admin/post-new.php?post_type=folder1,7413.5574.3934.51
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=folder1,4902.1232.4535.95

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • category_children
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/media-folder/admin/partials/media-folder-admin-display.php
    • > /wp-content/plugins/media-folder/public/partials/media-folder-public-display.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/media-folder/includes/class-media-folder-list-table.php on line 13
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/media-folder/includes/class-media-folder-list-table.php on line 13
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/media-folder/includes/class-media-folder-list-table.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

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
1 plugin tags: custom post type media slider attachements

media-folder/media-folder.php Passed 13 tests

This is the main PHP file of "Media Folder" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
93 characters long description:
Attach media files to a common parent post, easily upload and list the content of the folder.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin434 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP15218688428
JavaScript24546
CSS2080

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity3.60
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity1.63
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods41
▷ Static methods512.20%
▷ Public methods3380.49%
▷ Protected methods00.00%
▷ Private methods819.51%
Functions5
▷ Named functions5100.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 were not PNG files found in your plugin