94% external-media-without-import

Code Review | External Media without Import

WordPress plugin External Media without Import scored 94% from 54 tests.

About plugin

  • Plugin page: external-media-wi...
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.4-5.0.2
  • WordPress version: 5.8.1
  • First release: Jun 2, 2017
  • Latest release: Dec 30, 2018
  • Number of updates: 84
  • Update frequency: every 7.4 days
  • Top authors: zzxiang (100%)

Code review

54 tests

User reviews

28 reviews

Install metrics

6,000+ active / 31,022 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼140.78ms] Passed 4 tests

An overview of server-side resources used by External Media without Import
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.1635.21 ▲8.43
Dashboard /wp-admin3.11 ▲0.0549.17 ▲0.38
Posts /wp-admin/edit.php3.16 ▲0.0546.44 ▲0.85
Add New Post /wp-admin/post-new.php5.47 ▲0.0389.94 ▼560.30
Media Library /wp-admin/upload.php3.05 ▲0.0532.58 ▼4.03
Add External Media without Import /wp-admin/upload.php?page=add-external-media-without-import3.0230.29

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for External Media without Import
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,712 ▲11615.99 ▲0.3810.14 ▼1.9144.57 ▼0.82
Dashboard /wp-admin2,982 ▲456.06 ▲0.08144.19 ▼17.64122.82 ▲16.81
Posts /wp-admin/edit.php2,748 ▲92.72 ▼0.1369.76 ▲2.8583.79 ▲0.07
Add New Post /wp-admin/post-new.php1,622 ▼6121.00 ▲2.69290.47 ▼146.70110.02 ▲1.36
Media Library /wp-admin/upload.php1,836 ▲295.05 ▲0.05158.50 ▲12.51113.57 ▼1.07
Add External Media without Import /wp-admin/upload.php?page=add-external-media-without-import1,0912.0956.2557.21

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
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 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function emwi\\add_action() in wp-content/plugins/external-media-without-import/external-media-without-import.php:37

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: remote image, remote media, remote url, remote file, external media

external-media-without-import/external-media-without-import.php Passed 13 tests

The entry point to "External Media without Import" version 1.1.2 is a PHP file that has certain tags in its header comment area
103 characters long description:
Add external images to the media library without importing, i.e. uploading them to your WordPress site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin394 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP12733209
JavaScript17479
CSS115065
Markdown133041

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
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
Namespaces1
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%
Functions10
▷ Named functions990.00%
▷ Anonymous functions110.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin