83% upload-media-by-url

Code Review | Upload Media By URL

WordPress plugin Upload Media By URL scored83%from 54 tests.

About plugin

  • Plugin page: upload-media-by-url
  • Plugin version: 1.0.10
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.3-6.3
  • WordPress version: 6.3.1
  • First release: Feb 26, 2020
  • Latest release: Oct 2, 2023
  • Number of updates: 34
  • Update frequency: every 38.7 days
  • Top authors: notetoservices (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active /13,325 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.02ms] Passed 4 tests

An overview of server-side resources used by Upload Media By URL
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.09 ▼0.87
Dashboard /wp-admin3.33 ▲0.0343.63 ▼1.69
Posts /wp-admin/edit.php3.38 ▲0.0344.65 ▼4.00
Add New Post /wp-admin/post-new.php5.91 ▲0.0377.74 ▼6.73
Media Library /wp-admin/upload.php3.26 ▲0.0334.77 ▼3.65

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Upload Media By URL
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.40 ▼0.001.67 ▲0.0038.17 ▼5.09
Dashboard /wp-admin2,197 ▲175.53 ▼0.1580.85 ▼5.9638.44 ▼2.62
Posts /wp-admin/edit.php2,102 ▲51.98 ▼0.0532.97 ▼2.3135.74 ▼3.57
Add New Post /wp-admin/post-new.php1,528 ▼1823.35 ▲5.09656.05 ▲19.9853.70 ▼24.89
Media Library /wp-admin/upload.php1,428 ▲284.17 ▲0.0792.44 ▼13.3954.63 ▲8.58

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/upload-media-by-url/inc/umbumedia.php:41

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #1 (Upload Media By URL functionality)
You can look at the official readme.txt

upload-media-by-url/uploadmediabyurl.php 85% from 13 tests

The main PHP file in "Upload Media By URL" ver. 1.0.10 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("upload-media-by-url.php" instead of "uploadmediabyurl.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected121 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP259103120
CSS1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods571.43%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png6.14KB3.09KB▼ 49.66%
assets/screenshot-3.png26.00KB10.67KB▼ 58.94%