78% more-mime-type-filters

Code Review | More Mime Type Filters

WordPress plugin More Mime Type Filters scored78%from 54 tests.

About plugin

  • Plugin page: more-mime-type-fi...
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.5
  • WordPress version: 6.3.1
  • First release: May 29, 2011
  • Latest release: Dec 20, 2012
  • Number of updates: 10
  • Update frequency: every 57.1 days
  • Top authors: trepmal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /4,761 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

This is a short check of server-side resources used by More Mime Type Filters
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0241.83 ▲1.64
Dashboard /wp-admin3.21 ▼0.0935.17 ▼13.60
Posts /wp-admin/edit.php3.28 ▼0.0842.26 ▼11.73
Add New Post /wp-admin/post-new.php5.46 ▼0.4278.67 ▼25.88
Media Library /wp-admin/upload.php3.22 ▼0.0135.38 ▼3.37
Mime Types /wp-admin/upload.php?page=mime_type_mngr3.1833.17

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for More Mime Type Filters
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3213.95 ▼0.611.83 ▼0.0644.46 ▲2.13
Dashboard /wp-admin2,196 ▲195.65 ▲0.0796.46 ▼6.6543.11 ▼1.74
Posts /wp-admin/edit.php2,104 ▲41.98 ▼0.0235.38 ▼0.5435.85 ▼5.65
Add New Post /wp-admin/post-new.php1,531 ▲523.13 ▲0.07664.85 ▼23.6650.77 ▼15.86
Media Library /wp-admin/upload.php1,389 ▼114.17 ▼0.0399.63 ▼7.6743.69 ▼5.51
Mime Types /wp-admin/upload.php?page=mime_type_mngr4,2741.6630.1554.09

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/upload.php?page=mime_type_mngr
    • > User deprecated in wp-includes/functions.php+5828
    Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.
  • 95 occurences, only the last one shown
    • > GET request to /wp-admin/upload.php?page=mime_type_mngr
    • > Notice in wp-content/plugins/more-mime-type-filters/mimes.php+122
    Only variables should be passed by reference

SRP 50% from 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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/more-mime-type-filters/mimes.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: media library, mime types

more-mime-type-filters/mimes.php 92% from 13 tests

The main PHP script in "More Mime Type Filters" version 0.3 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("more-mime-type-filters.php" instead of "mimes.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
Success! There were no dangerous files found in this plugin117 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11716117

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.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

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