84% webp-svg-support

Code Review | WebP & SVG Support

WordPress plugin WebP & SVG Support scored 84% from 54 tests.

About plugin

  • Plugin page: webp-svg-support
  • Plugin version: 1.3.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.1.1
  • WordPress version: 6.3.1
  • First release: Jun 2, 2021
  • Latest release: Nov 26, 2022
  • Number of updates: 7
  • Update frequency: every 77.4 days
  • Top authors: rezakhan995 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

600+ active / 2,270 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.53ms] Passed 4 tests

Server-side resources used by WebP & SVG Support
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0636.86 ▼4.40
Dashboard /wp-admin3.36 ▲0.0550.66 ▲3.00
Posts /wp-admin/edit.php3.47 ▲0.1151.00 ▲5.44
Add New Post /wp-admin/post-new.php5.94 ▲0.0586.05 ▼18.67
Media Library /wp-admin/upload.php3.28 ▲0.0538.76 ▲1.96
WebP & SVG Support /wp-admin/options-general.php?page=webp_svg_support3.2432.82

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
webpsvg_allow_svg
widget_theysaidso_widget
db_upgraded
can_compress_scripts
webpsvg_allow_webp
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for WebP & SVG Support
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.22 ▼1.161.92 ▼0.0639.47 ▼4.13
Dashboard /wp-admin2,210 ▲254.86 ▼0.0497.37 ▼19.9138.68 ▼4.74
Posts /wp-admin/edit.php2,093 ▲42.06 ▲0.0040.82 ▲0.8135.18 ▼4.61
Add New Post /wp-admin/post-new.php1,536 ▲823.15 ▲4.83674.35 ▲61.3047.10 ▼7.45
Media Library /wp-admin/upload.php1,392 ▲74.20 ▲0.14110.74 ▲5.2048.85 ▲2.11
WebP & SVG Support /wp-admin/options-general.php?page=webp_svg_support8172.0223.8523.39

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/webp-svg-support/webp-svg-support.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Webpsvg_Support\\Core\\wp_die() in wp-content/plugins/webp-svg-support/core/bootstrap.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: webp, support, media, safe, svg

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

Analyzing the main PHP file in "WebP & SVG Support" version 1.3.0
90 characters long description:
Allows WebP and SVG image file upload into WordPress media and sanitizes before saving it.

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
There were no executable files found in this plugin143 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP359207143

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity6.00
▷ Minimum class complexity2.00
▷ Maximum class complexity10.00
Average method complexity1.48
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods21
▷ Static methods1152.38%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ 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
There are no PNG files in this plugin