84% import-cdn-remote-images

Code Review | Import CDN-Remote Images

WordPress plugin Import CDN-Remote Images scored84%from 54 tests.

About plugin

  • Plugin page: import-cdn-remote...
  • Plugin version: 2.01
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.4-6.3
  • WordPress version: 6.3.1
  • First release: Aug 18, 2020
  • Latest release: Aug 12, 2023
  • Number of updates: 40
  • Update frequency: every 27.2 days
  • Top authors: atakanau (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /2,484 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼2.92ms] Passed 4 tests

This is a short check of server-side resources used by Import CDN-Remote Images
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1443.09 ▲0.74
Dashboard /wp-admin3.44 ▲0.1450.34 ▼4.02
Posts /wp-admin/edit.php3.55 ▲0.2046.73 ▼2.01
Add New Post /wp-admin/post-new.php6.02 ▲0.1388.18 ▼6.40
Media Library /wp-admin/upload.php3.36 ▲0.1339.80 ▲3.31
Import images /wp-admin/upload.php?page=aauicri-import3.3332.39

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Import CDN-Remote Images
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲6213.18 ▼1.121.68 ▼0.0547.57 ▼0.13
Dashboard /wp-admin2,232 ▲264.88 ▼0.94102.81 ▼2.5936.56 ▼9.59
Posts /wp-admin/edit.php2,108 ▲82.06 ▲0.0235.54 ▼3.4631.92 ▼7.60
Add New Post /wp-admin/post-new.php1,533 ▲223.03 ▲0.08687.20 ▲13.1059.12 ▲2.38
Media Library /wp-admin/upload.php1,411 ▲114.27 ▲0.01112.14 ▼4.5050.74 ▲1.17
Import images /wp-admin/upload.php?page=aauicri-import1,1981.7429.0841.62

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/import-cdn-remote-images/import-cdn-remote-images.php:25

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)
There were no browser issues 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
7 plugin tags: remote file, remote media, remote image, external media, cloudinary...

import-cdn-remote-images/import-cdn-remote-images.php Passed 13 tests

The primary PHP file in "Import CDN-Remote Images" version 2.01 is used by WordPress to initiate all plugin functionality
116 characters long description:
Add Cloudinary images and videos 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 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin1,171 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP28291690
JavaScript12718368
PO File1232361
CSS15152

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity86.00
▷ Minimum class complexity86.00
▷ Maximum class complexity86.00
Average method complexity5.72
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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