84% wp-add-mime-types

Code Review | WP Add Mime Types

WordPress plugin WP Add Mime Types scored84%from 54 tests.

About plugin

  • Plugin page: wp-add-mime-types
  • Plugin version: 3.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.1
  • WordPress version: 6.3.1
  • First release: Aug 16, 2013
  • Latest release: Oct 26, 2022
  • Number of updates: 75
  • Update frequency: every 44.8 days
  • Top authors: kimipooh (100%)

Code review

54 tests

User reviews

23 reviews

Install metrics

50,000+ active /451,133 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

Analyzing server-side resources used by WP Add Mime Types
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.45 ▼7.32
Dashboard /wp-admin3.31 ▲0.0147.94 ▼3.13
Posts /wp-admin/edit.php3.36 ▲0.0147.63 ▼1.32
Add New Post /wp-admin/post-new.php5.89 ▲0.01101.18 ▼3.92
Media Library /wp-admin/upload.php3.24 ▲0.0134.28 ▼1.37
Mime Type Settings /wp-admin/options-general.php?page=wp-add-mime-types/includes/admin.php3.2031.75

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Add Mime Types
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.27 ▼0.081.83 ▲0.1038.98 ▼2.49
Dashboard /wp-admin2,199 ▲225.62 ▼0.0586.38 ▼10.6742.63 ▼5.13
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0333.98 ▼4.2838.13 ▲2.63
Add New Post /wp-admin/post-new.php1,529 ▲121.00 ▼1.92661.44 ▼34.8753.80 ▼6.37
Media Library /wp-admin/upload.php1,398 ▼54.15 ▼0.0797.95 ▲1.3941.68 ▼3.15
Mime Type Settings /wp-admin/options-general.php?page=wp-add-mime-types/includes/admin.php1,6191.9923.8229.49

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
Please 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_action() in wp-content/plugins/wp-add-mime-types/wp-add-mime-types.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (Setting Menu), #2 (Setting Menu in case of the multisite), #3 (Ignore to the right of '#' on a line), #4 (Security Options)
The official readme.txt is a good inspiration

wp-add-mime-types/wp-add-mime-types.php 92% from 13 tests

The entry point to "WP Add Mime Types" version 3.0.3 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Domain Path: The domain path points to an invalid folder, "/lang" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin395 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP36768395

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.73
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
3 PNG files occupy 0.25MB with 0.19MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png77.30KB21.36KB▼ 72.37%
screenshot-1.png115.50KB20.79KB▼ 82.00%
screenshot-3.png63.16KB17.23KB▼ 72.72%