84% allow-svg

Code Review | Allow SVG

WordPress plugin Allow SVG scored 84% from 54 tests.

About plugin

  • Plugin page: allow-svg
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0
  • WordPress version: 6.3.1
  • First release: Jun 4, 2022
  • Latest release: Jun 6, 2022
  • Number of updates: 5
  • Update frequency: every 0.6 days
  • Top authors: wphelpline (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 589 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
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.35ms] Passed 4 tests

Analyzing server-side resources used by Allow SVG
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.73 ▼3.37
Dashboard /wp-admin3.31 ▲0.0145.41 ▼5.98
Posts /wp-admin/edit.php3.36 ▲0.0147.96 ▼5.16
Add New Post /wp-admin/post-new.php5.89 ▲0.0191.79 ▲2.36
Media Library /wp-admin/upload.php3.23 ▲0.0134.28 ▲1.10

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Allow SVG
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.24 ▼1.004.88 ▲3.1241.28 ▼10.63
Dashboard /wp-admin2,206 ▲185.86 ▲0.98106.40 ▼9.8041.80 ▼5.96
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0140.13 ▲5.1136.97 ▼0.57
Add New Post /wp-admin/post-new.php1,544 ▼418.55 ▼4.77620.97 ▼65.8558.56 ▲4.66
Media Library /wp-admin/upload.php1,391 ▼04.28 ▼0.0293.10 ▼10.9640.68 ▼7.34

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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/allow-svg/allow-svg.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
No tags were found

allow-svg/allow-svg.php Passed 13 tests

"Allow SVG" version 1.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
40 characters long description:
Allow SVG file upload in Wordpress Media

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin29 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1391329

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
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 functions266.67%
▷ Anonymous functions133.33%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin