84% advanced-uploader

Code Review | Advanced uploader

WordPress plugin Advanced uploader scored 84% from 54 tests.

About plugin

  • Plugin page: advanced-uploader
  • Plugin version: 4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.2.4
  • WordPress version: 5.9.2
  • First release: Mar 18, 2014
  • Latest release: Mar 1, 2021
  • Number of updates: 103
  • Update frequency: every 24.7 days
  • Top authors: ojredmond (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

2,000+ active / 33,914 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Advanced uploader
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0355.65 ▲2.71
Dashboard /wp-admin3.45 ▲0.0532.71 ▼4.41
Posts /wp-admin/edit.php3.68 ▲0.0436.26 ▲0.32
Add New Post /wp-admin/post-new.php6.92 ▼0.0592.69 ▼1,192.49
Media Library /wp-admin/upload.php3.34 ▲0.0526.11 ▲2.59
Advanced uploader /wp-admin/upload.php?page=adv-file-upload3.3125.77

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 56 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced uploader
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,771 ▲1716.01 ▲0.305.69 ▼0.672.35 ▼0.51
Dashboard /wp-admin2,900 ▲425.99 ▼0.12127.94 ▲0.70167.85 ▲2.29
Posts /wp-admin/edit.php2,699 ▲113.22 ▼0.0264.02 ▼0.54136.82 ▼7.91
Add New Post /wp-admin/post-new.php1,758 ▲9721.66 ▲5.57439.31 ▲28.50165.48 ▲4.98
Media Library /wp-admin/upload.php1,705 ▲75.52 ▲0.02144.44 ▼3.24190.50 ▼6.21
Advanced uploader /wp-admin/upload.php?page=adv-file-upload1,0483.5099.83116.95

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-uploader/upload.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: upload, thumbnail

advanced-uploader/upload.php 85% from 13 tests

The principal PHP file in "Advanced uploader" v. 4.2 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("advanced-uploader.php" instead of "upload.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 206 characters long)

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
These items require your attention
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .xap - Silverlight Application Package in Microsoft Silverlight
      • wp-content/plugins/advanced-uploader/js/Moxie.xap
75,184 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript153,2073,02772,056
CSS9821381,790
PHP1209234954
HTML1673309
JSON10074
SVG1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
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%
Functions44
▷ Named functions44100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
20 PNG files occupy 0.07MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-bg_glass_95_fef1ec_1x400.png0.32KB0.15KB▼ 54.82%
js/jquery-ui-1.12.1.custom/images/ui-icons_777620_256x240.png4.44KB4.17KB▼ 6.02%
js/jquery-ui-1.12.1.custom/images/ui-icons_444444_256x240.png6.83KB4.17KB▼ 38.86%
css/images/ui-icons_cd0a0a_256x240.png4.44KB4.17KB▼ 6.02%
css/images/ui-icons_222222_256x240.png6.76KB4.17KB▼ 38.24%