10% safan-enable-svg

Code Review | Safan Enable SVG

WordPress plugin Safan Enable SVG scored 10% from 54 tests.

About plugin

  • Plugin page: safan-enable-svg
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.8
  • WordPress version: 5.8.1
  • First release: Jun 5, 2021
  • Latest release: Aug 18, 2021
  • Number of updates: 3
  • Update frequency: every 24.7 days
  • Top authors: largbasket (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 286 total downloads

Benchmarks

Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/safan-enable-svg/enable-svg.php+60
    require(wp-content/plugins/safan-enable-svg/includes/class-safan-enable-svg.php): failed to open stream: No such file or directory

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

A check of server-side resources used by Safan Enable SVG
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.83 ▲0.0038.33 ▲0.91
Dashboard /wp-admin3.06 ▲0.0045.94 ▼2.27
Posts /wp-admin/edit.php3.11 ▲0.0047.65 ▼0.17
Add New Post /wp-admin/post-new.php5.42 ▼0.0294.35 ▼571.89
Media Library /wp-admin/upload.php3.00 ▲0.0035.15 ▼0.27

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 21 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Safan Enable SVG
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.89 ▼0.018.17 ▼1.0653.00 ▼0.51
Dashboard /wp-admin2,967 ▲335.83 ▼0.08140.76 ▼11.18116.83 ▲0.22
Posts /wp-admin/edit.php2,739 ▼02.70 ▲0.0067.57 ▼2.9391.43 ▲2.35
Add New Post /wp-admin/post-new.php1,504 ▼7718.54 ▲0.37396.21 ▲3.41113.45 ▼8.12
Media Library /wp-admin/upload.php1,807 ▼35.03 ▲0.02152.97 ▼28.89133.69 ▲8.18

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
This plugin's uninstaller ran successfully

Smoke tests 75% from 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 50% from 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
Please fix the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/safan-enable-svg/admin/partials/enable-svg-admin-display.php
    • > /wp-content/plugins/safan-enable-svg/public/partials/enable-svg-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Invalid url: ""
  • Screenshots: These screenshots do not have images: #1 (Setting Page), #2 (Product Archive Page), #3 (Single Product Page)
The official readme.txt is a good inspiration

safan-enable-svg/enable-svg.php 92% from 13 tests

The main PHP script in "Safan Enable SVG" version 1.0.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("safan-enable-svg.php" instead of "enable-svg.php")

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 plugin173 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP12116514170
JavaScript12273
CSS2080

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.14
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods22
▷ Static methods29.09%
▷ Public methods1777.27%
▷ Protected methods00.00%
▷ Private methods522.73%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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