84% save-data-uri-images

Code Review | Save Data:URL images

WordPress plugin Save Data:URL images scored84%from 54 tests.

About plugin

  • Plugin page: save-data-uri-images
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5
  • WordPress version: 6.3.1
  • First release: Jan 9, 2013
  • Latest release: Jan 9, 2013
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: xzorro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,154 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.71MB] [CPU: ▼21.81ms] Passed 4 tests

This is a short check of server-side resources used by Save Data:URL images
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0134.12 ▼3.97
Dashboard /wp-admin3.32 ▼0.0345.02 ▼15.41
Posts /wp-admin/edit.php3.38 ▲0.0146.81 ▼0.77
Add New Post /wp-admin/post-new.php3.06 ▼2.8427.39 ▼67.10
Media Library /wp-admin/upload.php3.25 ▲0.0137.16 ▲4.38

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Save Data:URL images
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲1814.75 ▲0.401.56 ▼0.1838.31 ▼9.26
Dashboard /wp-admin2,198 ▲215.63 ▼0.0590.53 ▲3.1741.36 ▲0.98
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.0039.41 ▲4.2537.39 ▼1.28
Add New Post /wp-admin/post-new.php1,535 ▼218.20 ▼0.28630.71 ▲24.9762.92 ▼2.00
Media Library /wp-admin/upload.php1,400 ▼04.17 ▼0.10102.24 ▲5.5145.47 ▲4.34

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/save-data-uri-images/save-img-data.php:99

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Paste images from the windows clipboard (http://www.networks.by/pic-1.jpg)), #2 (Picture has a Data:URL format (http://www.networks.by/pic-2.jpg)), #3 (Write a title picture and save (http://www.networks.by/pic-3.jpg)), #4 (Image stored on a server with a good filename (http://www.networks.by/pic-4.jpg))
You can look at the official readme.txt

save-data-uri-images/save-img-data.php 92% from 13 tests

The primary PHP file in "Save Data:URL images" version 0.1 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("save-data-uri-images.php" instead of "save-img-data.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin63 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1271063

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions5
▷ Named functions5100.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
PNG images were not found in this plugin