83% oh-my-svg

Code Review | OH MY Svg

WordPress plugin OH MY Svg scored83%from 54 tests.

About plugin

  • Plugin page: oh-my-svg
  • Plugin version: 0.1.3
  • PHP compatiblity: 7.1.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.1
  • WordPress version: 6.3.1
  • First release: Jul 26, 2022
  • Latest release: Feb 6, 2023
  • Number of updates: 7
  • Update frequency: every 27.9 days
  • Top authors: codekraft (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,241 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.01MB] [CPU: ▼15.15ms] Passed 4 tests

An overview of server-side resources used by OH MY Svg
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.41 ▼8.81
Dashboard /wp-admin3.31 ▼0.0447.84 ▼21.36
Posts /wp-admin/edit.php3.36 ▲0.0048.75 ▼6.21
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.97 ▼24.21
Media Library /wp-admin/upload.php3.23 ▲0.0042.19 ▲3.03

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for OH MY Svg
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.75 ▲0.381.93 ▲0.1243.29 ▼0.67
Dashboard /wp-admin2,198 ▲215.67 ▼0.0383.27 ▼8.1940.03 ▼0.40
Posts /wp-admin/edit.php2,100 ▼31.99 ▼0.0435.25 ▼5.2936.31 ▲1.21
Add New Post /wp-admin/post-new.php6,366 ▲4,82129.55 ▲6.36896.74 ▲260.4159.37 ▲7.05
Media Library /wp-admin/upload.php1,400 ▼04.28 ▲0.0697.91 ▼15.7042.17 ▼8.11

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
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/oh-my-svg/svg-block.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: vector, icon, upload, blocks, svg...

oh-my-svg/svg-block.php 77% from 13 tests

"OH MY Svg" version 0.1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Requires PHP: The required version number did not match the one declared in readme.txt ("7.1" instead of "7.1.0")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("oh-my-svg.php" instead of "svg-block.php")

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
There were no executable files found in this plugin566 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
Markdown11210553
JSON1007
PHP22165
JavaScript1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
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%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.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