94% extend-media-upload

Code Review | Extend Media Upload

WordPress plugin Extend Media Upload scored 94% from 54 tests.

About plugin

  • Plugin page: extend-media-upload
  • Plugin version: 2.07
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.6
  • WordPress version: 5.9.2
  • First release: Apr 3, 2018
  • Latest release: Dec 31, 2020
  • Number of updates: 53
  • Update frequency: every 18.9 days
  • Top authors: Katsushi Kawamori (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

800+ active / 17,714 total downloads

Benchmarks

Plugin footprint Passed 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.11MB] [CPU: ▼299.40ms] Passed 4 tests

Server-side resources used by Extend Media Upload
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.1963.17 ▲8.90
Dashboard /wp-admin3.54 ▲0.1439.63 ▼50.34
Posts /wp-admin/edit.php3.77 ▲0.1346.09 ▲5.98
Add New Post /wp-admin/post-new.php7.00 ▲0.0499.20 ▼1,150.72
Media Library /wp-admin/upload.php3.42 ▲0.1334.02 ▼2.51
Folder & Date /wp-admin/upload.php?page=extendmediaupload-settings3.3926.87

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Extend Media Upload
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,787 ▲6515.19 ▼0.455.72 ▼0.332.24 ▲0.17
Dashboard /wp-admin2,916 ▲615.99 ▼0.18123.82 ▼13.98161.25 ▲1.19
Posts /wp-admin/edit.php2,693 ▲23.23 ▼0.0064.95 ▼8.20135.64 ▼35.24
Add New Post /wp-admin/post-new.php1,693 ▼1820.93 ▼0.12431.02 ▼39.87161.19 ▼3.39
Media Library /wp-admin/upload.php1,700 ▲25.43 ▼0.04145.61 ▲8.85184.81 ▲0.80
Folder & Date /wp-admin/upload.php?page=extendmediaupload-settings1,8553.4269.75101.97

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/extend-media-upload/lib/class-extendmediauploadregist.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/extend-media-upload/lib/class-extendmediaupload.php:307
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/extend-media-upload/lib/class-extendmediauploadregist.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: admin, folders, date, time, media library...

extend-media-upload/extendmediaupload.php 92% from 13 tests

This is the main PHP file of "Extend Media Upload" version 2.07, 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:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("extend-media-upload.php" instead of "extendmediaupload.php")

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
Everything looks great! No dangerous files found in this plugin2,170 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2179591,263
PHP5137244610
CSS181297

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity27.33
▷ Minimum class complexity8.00
▷ Maximum class complexity43.00
Average method complexity4.95
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods1365.00%
▷ Protected methods00.00%
▷ Private methods735.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin