90% gl-import-external-images

Code Review | GL Import External Images form URLs

WordPress plugin GL Import External Images form URLs scored90%from 54 tests.

About plugin

  • Plugin page: gl-import-externa...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6.0-6.2
  • WordPress version: 6.3.1
  • First release: Jun 29, 2022
  • Latest release: Jun 25, 2023
  • Number of updates: 4
  • Update frequency: every 90.3 days
  • Top authors: imasikur22 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /1,188 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼1.42ms] Passed 4 tests

A check of server-side resources used by GL Import External Images form URLs
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.53 ▼4.28
Dashboard /wp-admin3.32 ▲0.0245.55 ▼2.92
Posts /wp-admin/edit.php3.37 ▲0.0246.06 ▼3.06
Add New Post /wp-admin/post-new.php5.90 ▲0.0292.61 ▲5.24
Media Library /wp-admin/upload.php3.24 ▲0.0235.98 ▲4.58

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for GL Import External Images form URLs
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.27 ▼0.971.82 ▼0.0740.26 ▼12.17
Dashboard /wp-admin2,206 ▲155.90 ▲1.00103.35 ▼13.3238.90 ▼10.87
Posts /wp-admin/edit.php2,089 ▼02.00 ▲0.0040.18 ▲3.0533.97 ▼0.69
Add New Post /wp-admin/post-new.php1,543 ▲2918.52 ▲0.86607.89 ▼78.4253.23 ▼16.09
Media Library /wp-admin/upload.php1,423 ▲324.25 ▲0.02101.19 ▲2.4541.35 ▼2.11

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: media library, external images, import, green life it, image...

gl-import-external-images/gl-import-external-images.php 92% from 13 tests

The main PHP script in "GL Import External Images form URLs" version 2.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected1,663 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP54086471,663

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity48.75
▷ Minimum class complexity9.00
▷ Maximum class complexity86.00
Average method complexity3.12
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods90
▷ Static methods11.11%
▷ Public methods5662.22%
▷ Protected methods66.67%
▷ Private methods2831.11%
Functions3
▷ Named functions3100.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
No PNG images were found in this plugin