90% svg-block

Code Review | SVG Block

WordPress plugin SVG Block scored90%from 54 tests.

About plugin

  • Plugin page: svg-block
  • Plugin version: 1.1.17
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.3-6.4
  • WordPress version: 6.3.1
  • First release: Apr 5, 2022
  • Latest release: Oct 31, 2023
  • Number of updates: 53
  • Update frequency: every 10.8 days
  • Top authors: Mr2P (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active /9,630 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

Analyzing server-side resources used by SVG Block
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0738.28 ▼1.39
Dashboard /wp-admin3.36 ▲0.0155.00 ▼3.86
Posts /wp-admin/edit.php3.41 ▲0.0548.68 ▲1.55
Add New Post /wp-admin/post-new.php5.95 ▲0.0683.47 ▼14.66
Media Library /wp-admin/upload.php3.29 ▲0.0533.56 ▲0.43

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for SVG Block
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲814.73 ▲0.091.87 ▼0.0244.89 ▲5.76
Dashboard /wp-admin2,197 ▲235.61 ▲0.0284.65 ▼0.9736.36 ▼4.82
Posts /wp-admin/edit.php2,099 ▼11.98 ▲0.0135.47 ▼6.9231.27 ▼6.26
Add New Post /wp-admin/post-new.php1,545 ▲823.23 ▲5.17653.04 ▲48.0356.62 ▼5.01
Media Library /wp-admin/upload.php1,402 ▲24.19 ▼0.0294.78 ▼1.1765.90 ▲26.02

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: gutenberg, svg, icon, block, image

svg-block/svg-block.php 92% from 13 tests

The entry point to "SVG Block" version 1.1.17 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Requires PHP: The required version number must match the one declared in readme.txt ("7.0.0" instead of "7.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected49,553 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JSON30049,070
JavaScript16610335
PHP338110146
CSS2002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods111.11%
▷ Public methods777.78%
▷ Protected methods00.00%
▷ Private methods222.22%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants2
▷ Global constants2100.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
No PNG files were detected