78% svgator

Code Review | SVGator - Add Animated SVG Easily

WordPress plugin SVGator - Add Animated SVG Easily scored 78% from 54 tests.

About plugin

  • Plugin page: svgator
  • Plugin version: 1.2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2.1
  • WordPress version: 6.3.1
  • First release: Nov 19, 2020
  • Latest release: May 18, 2023
  • Number of updates: 24
  • Update frequency: every 37.9 days
  • Top authors: svgator (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active / 13,044 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.18MB] [CPU: ▼3.10ms] Passed 4 tests

This is a short check of server-side resources used by SVGator - Add Animated SVG Easily
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1738.52 ▼5.26
Dashboard /wp-admin3.48 ▲0.1848.82 ▼0.29
Posts /wp-admin/edit.php3.59 ▲0.2451.06 ▲4.53
Add New Post /wp-admin/post-new.php6.08 ▲0.2087.86 ▼9.77
Media Library /wp-admin/upload.php3.40 ▲0.1836.37 ▲2.93

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 38 new files
Database: no new tables, 8 new options
New WordPress options
widget_media_svgator
WP_SVGATOR_VERSION
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for SVGator - Add Animated SVG Easily
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,909 ▲17413.55 ▼0.821.94 ▲0.1841.21 ▲0.96
Dashboard /wp-admin2,293 ▲1055.20 ▲0.15103.23 ▼1.1781.58 ▲35.58
Posts /wp-admin/edit.php2,179 ▲902.42 ▲0.4044.06 ▲3.3835.57 ▼1.39
Add New Post /wp-admin/post-new.php1,587 ▲4523.20 ▲5.01733.76 ▲130.4638.88 ▼18.65
Media Library /wp-admin/upload.php1,453 ▲654.24 ▲0.07118.65 ▲21.8345.10 ▲3.00

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 8 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • WP_SVGATOR_VERSION
    • widget_media_svgator
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/svgator/admin/snippets/projects.php
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_user_option() in wp-content/plugins/svgator/admin/projects.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/svgator/includes/class/WP_SVGator/Widget_Media_SVGator.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function menu_page_url() in wp-content/plugins/svgator/admin/snippets/empty-keys.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (SVGator's configuration page before logging in) image not found
The official readme.txt might help

svgator/svgator.php Passed 13 tests

The principal PHP file in "SVGator - Add Animated SVG Easily" v. 1.2.4 is loaded by WordPress automatically on each request
42 characters long description:
Import your animated SVGs from SVGator.com

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
Good job! No executable or dangerous file extensions detected2,621 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP222741751,119
JavaScript41895988
CSS15821372
Markdown130072
SVG60070

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.36
Average class complexity10.87
▷ Minimum class complexity1.00
▷ Maximum class complexity36.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods68
▷ Static methods1319.12%
▷ Public methods5479.41%
▷ Protected methods00.00%
▷ Private methods1420.59%
Functions13
▷ Named functions215.38%
▷ Anonymous functions1184.62%
Constants9
▷ Global constants333.33%
▷ Class constants666.67%
▷ Public constants6100.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.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png47.35KB19.06KB▼ 59.76%