84% svg-shortcode

Code Review | SVG Shortcode

WordPress plugin SVG Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: svg-shortcode
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.8.1
  • WordPress version: 6.3.1
  • First release: Aug 23, 2013
  • Latest release: Feb 28, 2014
  • Number of updates: 12
  • Update frequency: every 16.0 days
  • Top authors: amrendesign (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,494 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

Server-side resources used by SVG Shortcode
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.80 ▼2.27
Dashboard /wp-admin3.31 ▼0.0346.59 ▼12.98
Posts /wp-admin/edit.php3.36 ▲0.0143.41 ▼5.21
Add New Post /wp-admin/post-new.php5.89 ▲0.0190.03 ▼4.83
Media Library /wp-admin/upload.php3.23 ▲0.0130.82 ▼2.09

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

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

Browser metrics Passed 4 tests

Checking browser requirements for SVG Shortcode
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.69 ▼0.741.74 ▼0.1144.04 ▲3.90
Dashboard /wp-admin2,209 ▲244.86 ▼1.03100.99 ▼4.4138.77 ▼3.80
Posts /wp-admin/edit.php2,092 ▲32.00 ▼0.0534.81 ▼3.1333.41 ▼2.43
Add New Post /wp-admin/post-new.php1,533 ▲1923.35 ▲5.85585.17 ▼111.8449.26 ▼4.27
Media Library /wp-admin/upload.php1,391 ▲34.31 ▲0.09100.53 ▼9.0842.14 ▼4.07

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/svg-shortcode/svg-shortcode.php:30

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 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: image, embed, vector, svg, images...

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

The main PHP file in "SVG Shortcode" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 266 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected21 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP182421

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected