10% simple-upload-widget

Code Review | Simple Upload Widget

WordPress plugin Simple Upload Widget scored 10% from 54 tests.

About plugin

  • Plugin page: simple-upload-widget
  • Plugin version: 0.1.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 23, 2013
  • Latest release: Apr 20, 2014
  • Number of updates: 4
  • Update frequency: every 29.5 days
  • Top authors: fuhton (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,257 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/simple-upload-widget/simpleUploadWidget.php+48
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼59.34ms] Passed 4 tests

Analyzing server-side resources used by Simple Upload Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.447.42 ▼37.12
Dashboard /wp-admin2.05 ▼1.265.95 ▼56.85
Posts /wp-admin/edit.php2.05 ▼1.315.58 ▼54.32
Add New Post /wp-admin/post-new.php2.05 ▼3.845.29 ▼89.08
Media Library /wp-admin/upload.php2.05 ▼1.185.36 ▼28.26

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
widget_simple-upload-widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Simple Upload Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,939 ▲19314.67 ▼0.081.78 ▼0.1540.44 ▲2.31
Dashboard /wp-admin2,345 ▲1576.48 ▲1.57136.48 ▲21.2541.40 ▼0.87
Posts /wp-admin/edit.php2,254 ▲1653.35 ▲1.3054.66 ▲13.9835.08 ▲0.18
Add New Post /wp-admin/post-new.php1,530 ▲1121.25 ▼1.91630.66 ▼49.0831.10 ▼22.50
Media Library /wp-admin/upload.php1,384 ▼44.23 ▼0.0586.12 ▼20.1140.78 ▼3.43

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/simple-upload-widget/simpleUploadWidget.php+48
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_simple-upload-widget
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simple-upload-widget/simpleUploadWidget.php:11

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)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
9 plugin tags: upload, single, template, widget, image...

simple-upload-widget/simpleUploadWidget.php 92% from 13 tests

"Simple Upload Widget" version 0.1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("simple-upload-widget.php" instead of "simpleUploadWidget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected61 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP181236
JavaScript13820
Markdown1405

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
No PNG images were found in this plugin