84% svgmagic

Code Review | SVGMagic

WordPress plugin SVGMagic scored84%from 54 tests.

About plugin

  • Plugin page: svgmagic
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.0.1
  • WordPress version: 6.3.1
  • First release: Dec 17, 2014
  • Latest release: Dec 18, 2014
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: andibauer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,221 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
This plugin's installer ran successfully

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

Server-side resources used by SVGMagic
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.53 ▲1.09
Dashboard /wp-admin3.31 ▲0.0143.19 ▼8.97
Posts /wp-admin/edit.php3.36 ▲0.0147.83 ▲1.43
Add New Post /wp-admin/post-new.php5.89 ▲0.0185.13 ▼14.03
Media Library /wp-admin/upload.php3.24 ▲0.0132.19 ▲0.41

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for SVGMagic
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.59 ▼1.172.56 ▲0.5140.41 ▼4.15
Dashboard /wp-admin2,206 ▲185.90 ▲0.88110.35 ▼5.1536.99 ▼12.22
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0140.86 ▲5.6534.31 ▲1.01
Add New Post /wp-admin/post-new.php1,519 ▼2323.49 ▲5.07693.67 ▲74.2555.87 ▼4.70
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.0395.83 ▼8.3642.78 ▼1.17

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

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

Smoke tests 75% from 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)
Even though no errors were found, this is by no means an exhaustive test

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 items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/svgmagic/svg-magic.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: svgmagic, scalable vector graphics, jquery, svg

svgmagic/svg-magic.php 92% from 13 tests

The entry point to "SVGMagic" version 1.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("svgmagic.php" instead of "svg-magic.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin31 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP281827
JavaScript2164

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.23
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin