84% add-external-media

Code Review | Add External Media

WordPress plugin Add External Media scored84%from 54 tests.

About plugin

  • Plugin page: add-external-media
  • Plugin version: 1.0.5
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3
  • WordPress version: 6.3.1
  • First release: Mar 11, 2015
  • Latest release: Nov 13, 2019
  • Number of updates: 36
  • Update frequency: every 47.4 days
  • Top authors: leemon (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active /16,090 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Analyzing server-side resources used by Add External Media
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.89 ▼3.88
Dashboard /wp-admin3.32 ▼0.0248.43 ▼18.76
Posts /wp-admin/edit.php3.37 ▲0.0151.24 ▼1.10
Add New Post /wp-admin/post-new.php5.90 ▲0.0283.33 ▼15.08
Media Library /wp-admin/upload.php3.25 ▲0.0238.67 ▲2.07

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Add External Media
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲7913.56 ▼0.751.94 ▲0.2441.86 ▲3.50
Dashboard /wp-admin2,221 ▲175.80 ▲0.84100.01 ▼15.1843.03 ▲0.16
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0335.21 ▼1.7739.43 ▲2.67
Add New Post /wp-admin/post-new.php1,531 ▲517.44 ▼0.04651.95 ▼33.0451.70 ▼9.45
Media Library /wp-admin/upload.php1,399 ▲24.13 ▼0.09104.87 ▼4.0045.83 ▼1.04

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/add-external-media/add-external-media.php:285

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: external, oembed, admin, media, attachments

add-external-media/add-external-media.php Passed 13 tests

"Add External Media" version 1.0.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
39 characters long description:
Add external media to the media library

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
No dangerous file extensions were detected385 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript16120189
PHP14897140
PO File36656

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity2.42
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods18.33%
▷ Public methods1191.67%
▷ Protected methods18.33%
▷ 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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin