90% wp-media-file-type-manager

Code Review | WP Media File Type Manager

WordPress plugin WP Media File Type Manager scored90%from 54 tests.

About plugin

  • Plugin page: wp-media-file-typ...
  • Plugin version: 2.2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.4
  • WordPress version: 6.3.1
  • First release: Sep 2, 2017
  • Latest release: Nov 8, 2023
  • Number of updates: 64
  • Update frequency: every 35.3 days
  • Top authors: mughees.hafeez (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,474 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▲0.61ms] Passed 4 tests

Analyzing server-side resources used by WP Media File Type Manager
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0637.43 ▼2.44
Dashboard /wp-admin3.37 ▲0.0647.49 ▼6.40
Posts /wp-admin/edit.php3.42 ▲0.0649.39 ▲6.84
Add New Post /wp-admin/post-new.php6.19 ▲0.3099.84 ▲4.46
Media Library /wp-admin/upload.php3.63 ▲0.4041.34 ▲7.59
WP Media File Type /wp-admin/edit.php?post_type=mftype3.4455.74
Add New /wp-admin/post-new.php?post_type=mftype3.7648.60

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WP Media File Type Manager
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲5014.25 ▼0.032.11 ▼0.0844.18 ▲0.68
Dashboard /wp-admin2,208 ▲375.53 ▼0.0484.49 ▼8.9237.40 ▲1.56
Posts /wp-admin/edit.php2,119 ▲192.01 ▲0.0739.75 ▼0.9735.23 ▼1.90
Add New Post /wp-admin/post-new.php1,542 ▲1623.10 ▼0.02683.53 ▲73.8555.45 ▲1.22
Media Library /wp-admin/upload.php1,419 ▲224.22 ▲0.0498.55 ▼11.3544.82 ▼0.49
WP Media File Type /wp-admin/edit.php?post_type=mftype3,4772.0940.3036.67
Add New /wp-admin/post-new.php?post_type=mftype2,1817.59169.1563.69

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests Passed 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 Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 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: file upload, media, manager, security, file type

wp-media-file-type-manager/wp-media-file-type-manager.php Passed 13 tests

The entry point to "WP Media File Type Manager" version 2.2.4 is a PHP file that has certain tags in its header comment area
90 characters long description:
WP Media File Type Manager will allow you to manage different file types in Media Library.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin488 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP237130248
JavaScript237221
CSS20019

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
9 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/sort_desc.png0.15KB0.25KB0.00%
assets/images/sort_both.png0.20KB0.29KB0.00%
assets/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
assets/images/sort_asc.png0.16KB0.25KB0.00%
assets/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%