90% svg-uploads-support

Code Review | SVG Uploads Support

WordPress plugin SVG Uploads Support scored90%from 54 tests.

About plugin

  • Plugin page: svg-uploads-support
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9.8
  • WordPress version: 6.3.1
  • First release: Nov 29, 2017
  • Latest release: Oct 18, 2018
  • Number of updates: 9
  • Update frequency: every 38.0 days
  • Top authors: ablyperu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /1,894 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

Server-side resources used by SVG Uploads Support
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.39 ▲1.31
Dashboard /wp-admin3.31 ▲0.0153.49 ▲0.24
Posts /wp-admin/edit.php3.36 ▲0.0045.41 ▼5.15
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.79 ▼7.94
Media Library /wp-admin/upload.php3.23 ▲0.0039.21 ▲4.38

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for SVG Uploads Support
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲5114.05 ▼0.502.12 ▲0.5443.55 ▲0.23
Dashboard /wp-admin2,192 ▲215.48 ▼0.1183.06 ▼11.1141.39 ▼7.72
Posts /wp-admin/edit.php2,100 ▲32.01 ▲0.0239.12 ▲1.3336.41 ▼2.43
Add New Post /wp-admin/post-new.php1,526 ▼023.10 ▼0.62664.40 ▼1.3661.29 ▲15.25
Media Library /wp-admin/upload.php1,400 ▼04.19 ▼0.0699.96 ▼7.6744.78 ▲1.83

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • 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
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
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 shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (The WordPress media uploader show SVG files), #2 (The SVG file details)
You can look at the official readme.txt

svg-uploads-support/svg-uploads-support.php Passed 13 tests

The entry point to "SVG Uploads Support" version 2.1.1 is a PHP file that has certain tags in its header comment area
97 characters long description:
SVGs are not raster images like other formats (such as png, jpg, gif), they are actually vectors.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin14 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP241414

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.14
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%
Functions2
▷ Named functions2100.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
2 PNG files occupy 0.19MB with 0.13MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png131.40KB37.26KB▼ 71.65%
screenshot-2.png59.49KB16.15KB▼ 72.85%