78% svg-menu

Code Review | SVG Menu

WordPress plugin SVG Menu scored78%from 54 tests.

About plugin

  • Plugin page: svg-menu
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.1
  • WordPress version: 6.3.1
  • First release: Mar 2, 2019
  • Latest release: Mar 2, 2019
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: manntrix (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,813 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼4.85ms] Passed 4 tests

Analyzing server-side resources used by SVG Menu
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0938.40 ▼3.68
Dashboard /wp-admin3.39 ▲0.0845.60 ▼4.04
Posts /wp-admin/edit.php3.50 ▲0.1446.29 ▼7.48
Add New Post /wp-admin/post-new.php5.98 ▲0.1096.84 ▼4.18
Media Library /wp-admin/upload.php3.31 ▲0.0839.03 ▲4.83

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

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

Browser metrics Passed 4 tests

Checking browser requirements for SVG Menu
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,936 ▲20113.58 ▼0.795.39 ▲3.4140.33 ▼4.40
Dashboard /wp-admin2,226 ▲384.85 ▼0.96100.14 ▼0.4443.04 ▼1.62
Posts /wp-admin/edit.php2,112 ▲202.03 ▼0.0136.17 ▼3.8634.50 ▼1.89
Add New Post /wp-admin/post-new.php1,540 ▲718.47 ▼4.90620.46 ▲1.9850.05 ▼3.65
Media Library /wp-admin/upload.php1,405 ▲234.29 ▲0.0197.71 ▼1.7843.06 ▼0.23

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
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 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
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/svg-menu/public/partials/svgmenu-public-display.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/svg-menu/admin/partials/svgmenu-admin-display.php:26

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

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === svg-menu === )
The official readme.txt might help

svg-menu/svgmenu.php 85% from 13 tests

"SVG Menu" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("svg-menu.php" instead of "svgmenu.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin1,622 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
CSS414918924
JavaScript6164379
PHP12168536319

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity3.86
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity1.62
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods32
▷ Static methods26.25%
▷ Public methods2784.38%
▷ Protected methods00.00%
▷ Private methods515.62%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/menu1.png14.71KB5.39KB▼ 63.37%
admin/images/menu2.png7.58KB2.64KB▼ 65.17%
admin/images/menu3.png18.29KB7.55KB▼ 58.71%