83% mime-types-extended

Code Review | Mime Types Extended

WordPress plugin Mime Types Extended scored83%from 54 tests.

About plugin

  • Plugin page: mime-types-extended
  • Plugin version: 0.11
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.0
  • WordPress version: 6.3.1
  • First release: Dec 16, 2012
  • Latest release: Nov 30, 2014
  • Number of updates: 34
  • Update frequency: every 21.1 days
  • Top authors: f.staude (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

500+ active /9,470 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.27MB] [CPU: ▲5.58ms] Passed 4 tests

This is a short check of server-side resources used by Mime Types Extended
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2342.61 ▲1.79
Dashboard /wp-admin3.57 ▲0.2759.04 ▲5.73
Posts /wp-admin/edit.php3.68 ▲0.3355.02 ▲2.47
Add New Post /wp-admin/post-new.php6.17 ▲0.28110.22 ▲12.32
Media Library /wp-admin/upload.php3.53 ▲0.3062.51 ▲25.51
Mime types /wp-admin/options-general.php?page=mime-types-extended/class-mime-types-extended.php3.5052.97

Server storage [IO: ▲0.20MB] [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: 9 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Mime Types Extended
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5813.59 ▼0.791.60 ▼0.1740.87 ▼2.74
Dashboard /wp-admin2,225 ▲225.85 ▲0.81107.37 ▼9.2139.08 ▼0.36
Posts /wp-admin/edit.php2,104 ▲42.03 ▼0.0237.55 ▼5.0732.94 ▼2.88
Add New Post /wp-admin/post-new.php1,548 ▲1723.02 ▼0.10648.26 ▼47.4270.84 ▲12.64
Media Library /wp-admin/upload.php1,404 ▲14.23 ▲0.06115.54 ▲4.8550.14 ▲6.62
Mime types /wp-admin/options-general.php?page=mime-types-extended/class-mime-types-extended.php1,5502.0323.4931.49

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_uninstall_hook() in wp-content/plugins/mime-types-extended/mime-types-extended.php:43

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: Add an image for screenshot #1 (The settings dialog)
The official readme.txt is a good inspiration

mime-types-extended/mime-types-extended.php 77% from 13 tests

The main PHP file in "Mime Types Extended" ver. 0.11 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:
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected1,160 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP22662724
PO File2192392424
JavaScript11012

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity167.00
▷ Minimum class complexity167.00
▷ Maximum class complexity167.00
Average method complexity24.71
▷ Minimum method complexity1.00
▷ Maximum method complexity85.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods685.71%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
PNG images were not found in this plugin