83% media-upload-admin-widget

Code Review | Name: Media Upload Admin Widget

WordPress plugin Name: Media Upload Admin Widgetscored83%from 54 tests.

About plugin

  • Plugin page: media-upload-admi...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5.1
  • WordPress version: 6.3.1
  • First release: May 5, 2013
  • Latest release: May 5, 2013
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: ChrisHurst (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,932 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
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Name: Media Upload Admin Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0138.13 ▼4.84
Dashboard /wp-admin3.33 ▲0.0251.81 ▼1.66
Posts /wp-admin/edit.php3.37 ▲0.0150.69 ▼0.36
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.93 ▼20.84
Media Library /wp-admin/upload.php3.25 ▲0.0140.83 ▲6.77

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Name: Media Upload Admin Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,981 ▲22013.55 ▼0.721.66 ▼0.0043.95 ▲0.44
Dashboard /wp-admin2,387 ▲2075.33 ▼0.37109.92 ▲20.6042.79 ▲0.14
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0339.11 ▲4.2135.59 ▼1.13
Add New Post /wp-admin/post-new.php1,550 ▲523.22 ▼0.20627.75 ▲0.4747.08 ▼5.74
Media Library /wp-admin/upload.php1,400 ▲64.31 ▲0.1297.88 ▼4.6540.20 ▼7.88

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

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
Everything seems fine, however this is by no means 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
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_filter() in wp-content/plugins/media-upload-admin-widget/media-upload-admin-widget.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 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
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === Name: Media Upload Admin Widget=== )
  • Screenshots: Add images for these screenshots: #1 (Example admin widget before image upload.), #2 (Example admin widget after image upload.)
The official readme.txt might help

media-upload-admin-widget/media-upload-admin-widget.php Passed 13 tests

The main PHP file in "Name: Media Upload Admin Widget" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
77 characters long description:
Adds an Admin Widget for Drag and Drop Media Upload to the WP Admin Dashboard

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin51 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1351951

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.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