84% download-external-images-in-posts

Code Review | Download External Images In Posts

WordPress plugin Download External Images In Posts scored84%from 54 tests.

About plugin

  • Plugin page: download-external...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.7
  • WordPress version: 6.3.1
  • First release: Jan 17, 2017
  • Latest release: Dec 15, 2017
  • Number of updates: 11
  • Update frequency: every 29.9 days
  • Top authors: alexvorn2 (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

200+ active /6,612 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
Install script ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▲0.51ms] Passed 4 tests

An overview of server-side resources used by Download External Images In Posts
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0539.38 ▲0.21
Dashboard /wp-admin3.49 ▲0.1857.56 ▲2.98
Posts /wp-admin/edit.php3.61 ▲0.2551.75 ▲1.56
Add New Post /wp-admin/post-new.php6.05 ▲0.16101.36 ▼2.70
Media Library /wp-admin/upload.php3.39 ▲0.1652.41 ▲15.74
Download External Images In Posts /wp-admin/plugins.php?page=download_external_images_in_posts3.3943.24

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Download External Images In Posts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,941 ▲19514.86 ▲0.491.70 ▼0.1141.55 ▼1.31
Dashboard /wp-admin2,347 ▲1596.37 ▲0.49126.89 ▲18.4744.31 ▲0.48
Posts /wp-admin/edit.php2,253 ▲1643.33 ▲1.3152.65 ▲14.6932.30 ▼3.02
Add New Post /wp-admin/post-new.php1,417 ▼11917.77 ▼5.39600.80 ▼3.1931.97 ▼16.47
Media Library /wp-admin/upload.php1,389 ▲14.09 ▼0.15116.81 ▲9.7462.18 ▲13.11
Download External Images In Posts /wp-admin/plugins.php?page=download_external_images_in_posts1,1883.2456.5334.28

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
    • > GET request to /wp-admin/plugins.php?page=download_external_images_in_posts
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at Object.init (/wp-content/plugins/download-external-images-in-posts/includes/admin/js/admin-menu.js?ver=1.0:44:64)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/download-external-images-in-posts/includes/admin/js/admin-menu.js?ver=1.0:114:86)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/plugins.php?page=download_external_images_in_posts
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: image, download, images, posts

download-external-images-in-posts/download-external-images-in-posts.php Passed 13 tests

The principal PHP file in "Download External Images In Posts" v. 1.0 is loaded by WordPress automatically on each request
56 characters long description:
This plugin will download external images in your posts.

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
There were no executable files found in this plugin1,335 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP103491101,025
CSS1480234
JavaScript1251476

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods3
▷ Static methods133.33%
▷ Public methods133.33%
▷ Protected methods00.00%
▷ Private methods266.67%
Functions27
▷ Named functions27100.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