89% add-svg-support-for-media-uploader-inventivo

Code Review | Add SVG Support for Media Uploader | inventivo

WordPress plugin Add SVG Support for Media Uploader | inventivo scored89%from 54 tests.

About plugin

  • Plugin page: add-svg-support-f...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.7.1
  • WordPress version: 6.3.1
  • First release: Oct 5, 2018
  • Latest release: Apr 30, 2021
  • Number of updates: 31
  • Update frequency: every 30.3 days
  • Top authors: inventivode (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,354 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼10.06ms] Passed 4 tests

Analyzing server-side resources used by Add SVG Support for Media Uploader | inventivo
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0137.74 ▲3.98
Dashboard /wp-admin3.32 ▼0.0341.63 ▼21.13
Posts /wp-admin/edit.php3.38 ▲0.0145.28 ▼0.76
Add New Post /wp-admin/post-new.php5.91 ▲0.0281.27 ▼22.32
Media Library /wp-admin/upload.php3.25 ▲0.0138.21 ▲7.22

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

Add SVG Support for Media Uploader | inventivo: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲7114.28 ▼0.082.08 ▲0.5544.25 ▲7.51
Dashboard /wp-admin2,235 ▲585.70 ▲0.0981.05 ▼19.8276.69 ▲31.92
Posts /wp-admin/edit.php2,143 ▲432.11 ▲0.0836.36 ▼1.6930.37 ▼0.05
Add New Post /wp-admin/post-new.php1,588 ▲5423.23 ▲5.28675.49 ▲57.50144.26 ▲59.43
Media Library /wp-admin/upload.php1,443 ▲404.12 ▼0.10105.90 ▲8.8264.63 ▲24.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 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 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side


Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: upload svg, svg media uploader, svg

add-svg-support-for-media-uploader-inventivo/inventivo-addsvgsupport.php 77% from 13 tests

The principal PHP file in "Add SVG Support for Media Uploader | inventivo" v. 1.0.5 is loaded by WordPress automatically on each request
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("add-svg-support-for-media-uploader-inventivo.php" instead of "inventivo-addsvgsupport.php")
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin108 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ 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
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/images/icon-256x256-1.png33.55KB11.45KB▼ 65.87%