77% mimetypes-link-icons

Code Review | MimeTypes Link Icons

WordPress plugin MimeTypes Link Icons scored77%from 54 tests.

About plugin

  • Plugin page: mimetypes-link-icons
  • Plugin version: 3.2.12
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.9.0
  • WordPress version: 6.3.1
  • First release: Nov 2, 2010
  • Latest release: Jan 27, 2022
  • Number of updates: 130
  • Update frequency: every 31.6 days
  • Top authors: eagerterrier (100%)

Code review

54 tests

User reviews

25 reviews

Install metrics

10,000+ active /135,494 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
Install script ran successfully

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

An overview of server-side resources used by MimeTypes Link Icons
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.87 ▲0.12
Dashboard /wp-admin3.31 ▼0.0447.58 ▼17.04
Posts /wp-admin/edit.php3.36 ▲0.0046.89 ▼2.24
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.74 ▼20.43
Media Library /wp-admin/upload.php3.23 ▲0.0034.05 ▼2.31

Server storage [IO: ▲4.13MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 902 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for MimeTypes Link Icons
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.35 ▼1.011.77 ▼0.0944.93 ▲4.48
Dashboard /wp-admin2,224 ▲234.84 ▼1.02111.10 ▲2.9041.89 ▲0.28
Posts /wp-admin/edit.php2,100 ▼02.00 ▲0.0135.82 ▼5.3733.79 ▼4.39
Add New Post /wp-admin/post-new.php1,550 ▲623.19 ▼0.16658.43 ▲7.9053.15 ▼0.38
Media Library /wp-admin/upload.php1,400 ▼34.19 ▼0.0695.96 ▼5.1742.15 ▼2.84

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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 take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/mimetypes-link-icons/css/style.php
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined offset: 1 in wp-content/plugins/mimetypes-link-icons/css/style.php on line 7
    • > PHP Notice
      Undefined variable: mtli_height in wp-content/plugins/mimetypes-link-icons/css/style.php on line 12
    • > PHP Notice
      Undefined variable: mtli_leftorright in wp-content/plugins/mimetypes-link-icons/css/style.php on line 13
    • > PHP Notice
      Undefined index: cssvars in wp-content/plugins/mimetypes-link-icons/css/style.php on line 4
    • > PHP Notice
      Undefined variable: active_types in wp-content/plugins/mimetypes-link-icons/css/style.php on line 28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mimetypes-link-icons/mime_type_link_images.php:2175
    • > PHP Notice
      Undefined variable: mtli_image_type in wp-content/plugins/mimetypes-link-icons/css/style.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/mimetypes-link-icons/uninstall.php:14

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Screenshot of the administration screen), #2 (Screenshot of the administration screen - advanced settings), #3 (Screenshot of plugin in action.), #4 (MimeTypes Link Icons adds icons automatically to your inline attachments.), #5 (Now you can get MimeTypes Link Icons to add the file size of your attachment, too.)
  • Tags: You are using too many tags: 81 tag instead of maximum 10
Please take inspiration from this readme.txt

mimetypes-link-icons/mime_type_link_images.php 85% from 13 tests

This is the main PHP file of "MimeTypes Link Icons" version 3.2.12, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 154 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("mimetypes-link-icons.php" instead of "mime_type_link_images.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin1,555 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP44037461,163
PO File178108247
JavaScript4172466
CSS2131363
XML16316

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity251.00
▷ Minimum class complexity251.00
▷ Maximum class complexity251.00
Average method complexity5.63
▷ Minimum method complexity1.00
▷ Maximum method complexity55.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods54
▷ Static methods35.56%
▷ Public methods3462.96%
▷ Protected methods00.00%
▷ Private methods2037.04%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants00.00%
▷ Class constants11100.00%
▷ Public constants11100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
446 PNG files occupy 2.74MB with 1.29MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/qt-icon-16x16.png0.96KB0.96KB0.30%
images/ods-icon-64x64.png3.28KB2.26KB▼ 31.12%
images/air-icon-48x48.png9.12KB2.00KB▼ 78.08%
screenshot-1.png55.83KB22.01KB▼ 60.57%
images/indd-icon-128x128.png12.67KB4.46KB▼ 64.82%