84% grab-image-from-remote-url

Code Review | Grab Image From Remote URL

WordPress plugin Grab Image From Remote URL scored84%from 54 tests.

About plugin

  • Plugin page: grab-image-from-r...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.9.8
  • WordPress version: 6.3.1
  • First release: Sep 12, 2018
  • Latest release: Oct 4, 2018
  • Number of updates: 5
  • Update frequency: every 4.4 days
  • Top authors: mrcook76 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,192 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.07MB] [CPU: ▼3.82ms] Passed 4 tests

An overview of server-side resources used by Grab Image From Remote URL
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.44 ▼1.46
Dashboard /wp-admin3.38 ▲0.0845.06 ▼2.45
Posts /wp-admin/edit.php3.42 ▲0.0644.97 ▼4.23
Add New Post /wp-admin/post-new.php6.06 ▲0.1779.35 ▼7.13
Media Library /wp-admin/upload.php3.32 ▲0.1038.18 ▲5.01
Grab URL /wp-admin/upload.php?page=gifru-grab-from-remote-url3.2431.47

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Grab Image From Remote URL
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.22 ▼1.541.73 ▼0.3937.95 ▼8.71
Dashboard /wp-admin2,210 ▲225.79 ▲0.89103.40 ▼4.1039.01 ▼1.70
Posts /wp-admin/edit.php2,093 ▲42.01 ▲0.0233.70 ▼6.8732.88 ▼6.13
Add New Post /wp-admin/post-new.php1,549 ▲1518.27 ▼4.86610.37 ▼76.3876.64 ▲23.90
Media Library /wp-admin/upload.php1,392 ▲44.20 ▼0.1193.86 ▼5.8145.42 ▲3.95
Grab URL /wp-admin/upload.php?page=gifru-grab-from-remote-url7872.0323.4725.95

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/grab-image-from-remote-url/grab-image-from-remote-url.php

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 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
5 plugin tags: image, image grabber, remote upload, remote image uploader, remote url

grab-image-from-remote-url/grab-image-from-remote-url.php 92% from 13 tests

The entry point to "Grab Image From Remote URL" version 1.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 206 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin91 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1223691

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods266.67%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin