10% filetype-icons

Code Review | Filetype Icons

WordPress plugin Filetype Icons scored10%from 54 tests.

About plugin

  • Plugin page: filetype-icons
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5.1
  • WordPress version: 6.3.1
  • First release: Feb 24, 2013
  • Latest release: Feb 26, 2013
  • Number of updates: 9
  • Update frequency: every 0.8 days
  • Top authors: d3395 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,477 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/filetype-icons/filetype-icons.php+61
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.82ms] Passed 4 tests

Server-side resources used by Filetype Icons
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.18 ▲0.81
Dashboard /wp-admin3.33 ▲0.0347.59 ▼1.19
Posts /wp-admin/edit.php3.38 ▲0.0255.31 ▲7.52
Add New Post /wp-admin/post-new.php5.91 ▲0.0294.95 ▼12.07
Media Library /wp-admin/upload.php3.25 ▲0.0234.21 ▲1.17
Filetype Icons /wp-admin/options-general.php?page=filetype-icons/filetype-icons.php3.2230.62

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 200 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
FTIs_options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Filetype Icons
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6014.48 ▼0.081.79 ▼0.2140.22 ▼1.26
Dashboard /wp-admin2,210 ▲194.86 ▼0.03100.41 ▼11.8140.01 ▼3.46
Posts /wp-admin/edit.php2,096 ▲72.01 ▲0.0440.63 ▼1.8136.14 ▲0.91
Add New Post /wp-admin/post-new.php1,545 ▲718.38 ▼4.84633.97 ▲31.4054.12 ▲0.73
Media Library /wp-admin/upload.php1,395 ▲74.21 ▲0.0296.88 ▼4.5240.43 ▼2.70
Filetype Icons /wp-admin/options-general.php?page=filetype-icons/filetype-icons.php9152.0726.0441.02

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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 items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/filetype-icons/filetype-icons.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: declaration, icon, filetype, link

filetype-icons/filetype-icons.php Passed 13 tests

The main PHP script in "Filetype Icons" version 1.1.1 is automatically included on every request by WordPress
64 characters long description:
This plugin adds an Filetype extension icon before the link text

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin227 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13423176
PO File1151551

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
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%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
196 compressed PNG files occupy 0.21MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icons/32/file_extension_sea.png1.73KB1.53KB▼ 11.60%
icons/32/file_extension_thm.png1.47KB1.41KB▼ 4.31%
icons/32/file_extension_tmp.png1.38KB1.31KB▼ 5.58%
icons/32/file_extension_wav.png1.65KB1.50KB▼ 9.28%
icons/16/file_extension_asf.png0.66KB0.70KB0.00%