84% wp-extra-file-types

Code Review | WP Extra File Types

WordPress plugin WP Extra File Types scored84%from 54 tests.

About plugin

  • Plugin page: wp-extra-file-types
  • Plugin version: 0.5.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: Jan 3, 2015
  • Latest release: Nov 5, 2022
  • Number of updates: 72
  • Update frequency: every 39.8 days
  • Top authors: davide.airaghi (100%)

Code review

54 tests

User reviews

34 reviews

Install metrics

60,000+ active /286,320 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: ▲1.08MB] [CPU: ▼8.41ms] Passed 4 tests

An overview of server-side resources used by WP Extra File Types
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.49 ▲1.0339.36 ▼4.24
Dashboard /wp-admin4.39 ▲1.0846.03 ▼6.63
Posts /wp-admin/edit.php4.49 ▲1.1345.99 ▼11.56
Add New Post /wp-admin/post-new.php7.06 ▲1.1781.72 ▼11.20
Media Library /wp-admin/upload.php4.33 ▲1.0935.69 ▲1.80
Extra File Types /wp-admin/options-general.php?page=wp-extra-file-types-page4.4788.79

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WP Extra File Types
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9414.45 ▲0.021.88 ▲0.0241.81 ▼7.11
Dashboard /wp-admin2,207 ▲195.80 ▲0.90100.30 ▼17.8238.31 ▼6.75
Posts /wp-admin/edit.php2,090 ▲11.98 ▼0.0735.88 ▼5.3532.67 ▼3.92
Add New Post /wp-admin/post-new.php1,545 ▲1218.35 ▼4.72686.66 ▼16.5759.06 ▲6.89
Media Library /wp-admin/upload.php1,395 ▲74.27 ▲0.1194.77 ▼10.6641.61 ▼1.85
Extra File Types /wp-admin/options-general.php?page=wp-extra-file-types-page15,1241.6833.8698.71

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • wpeft_types
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • wpeft_custom_types

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-extra-file-types/wp-extra-file-types.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: media library, upload, file type

wp-extra-file-types/wp-extra-file-types.php Passed 13 tests

This is the main PHP file of "WP Extra File Types" version 0.5.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
97 characters long description:
Plugin to let you extend the list of allowed file types supported by the Wordpress Media Library.

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
There were no executable files found in this plugin484 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23436484

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity72.00
▷ Minimum class complexity72.00
▷ Maximum class complexity72.00
Average method complexity5.18
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods847.06%
▷ Protected methods211.76%
▷ Private methods741.18%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin