94% auto-save-remote-images-drafts

Code Review | Auto Save Remote Images (Drafts)

WordPress plugin Auto Save Remote Images (Drafts) scored 94% from 54 tests.

About plugin

  • Plugin page: auto-save-remote-...
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.6
  • WordPress version: 5.8.1
  • First release: Jul 3, 2015
  • Latest release: Dec 29, 2020
  • Number of updates: 22
  • Update frequency: every 91.3 days
  • Top authors: fernandiez (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active / 3,878 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.33MB] [CPU: ▼155.31ms] Passed 4 tests

Analyzing server-side resources used by Auto Save Remote Images (Drafts)
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1342.05 ▲15.41
Dashboard /wp-admin3.08 ▲0.0247.78 ▼0.26
Posts /wp-admin/edit.php3.13 ▲0.0247.32 ▲3.30
Add New Post /wp-admin/post-new.php4.06 ▼1.3745.80 ▼626.24
Media Library /wp-admin/upload.php3.02 ▲0.0234.15 ▲1.97
ASRI Drafts /wp-admin/tools.php?page=auto-save-remote-images-drafts2.9928.70

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Auto Save Remote Images (Drafts)
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲13616.24 ▲1.0312.37 ▲3.2050.29 ▲5.19
Dashboard /wp-admin2,972 ▲385.93 ▼0.21149.30 ▼12.54102.31 ▼13.41
Posts /wp-admin/edit.php2,744 ▲52.72 ▲0.0172.05 ▼0.0392.32 ▲7.67
Add New Post /wp-admin/post-new.php1,686 ▲318.28 ▼0.50489.24 ▲78.97113.66 ▲3.10
Media Library /wp-admin/upload.php1,846 ▲395.11 ▲0.08156.12 ▲4.86113.66 ▼5.37
ASRI Drafts /wp-admin/tools.php?page=auto-save-remote-images-drafts1,0382.0558.6486.91

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 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 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
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/auto-save-remote-images-drafts/auto-save-remote-images-drafts.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
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 uses markdown syntax to describe your plugin to the world
8 plugin tags: draft, hotlink, images, remote image, attachment...

auto-save-remote-images-drafts/auto-save-remote-images-drafts.php 92% from 13 tests

This is the main PHP file of "Auto Save Remote Images (Drafts)" version 1.0.9, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 150 characters long)

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
Everything looks great! No dangerous files found in this plugin75 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1202375

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected