84% wp-visual-sitemap

Code Review | WP Visual Sitemap

WordPress plugin WP Visual Sitemap scored84%from 54 tests.

About plugin

  • Plugin page: wp-visual-sitemap
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.5-5.3.2
  • WordPress version: 6.3.1
  • First release: Jun 1, 2017
  • Latest release: Aug 26, 2020
  • Number of updates: 29
  • Update frequency: every 40.8 days
  • Top authors: corgdesign (79.31%)corgmo (24.14%)

Code review

54 tests

User reviews

3 reviews

Install metrics

900+ active /6,435 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼0.65ms] Passed 4 tests

A check of server-side resources used by WP Visual Sitemap
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0842.40 ▲3.95
Dashboard /wp-admin3.40 ▲0.0946.09 ▲1.06
Posts /wp-admin/edit.php3.51 ▲0.1550.23 ▲4.27
Add New Post /wp-admin/post-new.php6.00 ▲0.1184.42 ▼11.86
Media Library /wp-admin/upload.php3.32 ▲0.0943.70 ▲10.19
WP Visual Sitemap /wp-admin/options-general.php?page=wpvs_settings3.2632.56

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Visual Sitemap
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲6613.48 ▼1.101.69 ▼0.4343.28 ▼0.85
Dashboard /wp-admin2,241 ▲565.12 ▼0.73102.69 ▼0.8036.56 ▼6.21
Posts /wp-admin/edit.php2,126 ▲372.52 ▲0.4947.31 ▲5.6131.70 ▼3.25
Add New Post /wp-admin/post-new.php1,701 ▲17822.95 ▼0.30613.21 ▲25.5829.85 ▼21.00
Media Library /wp-admin/upload.php1,423 ▲324.54 ▲0.4198.87 ▼12.3540.10 ▼9.89
WP Visual Sitemap /wp-admin/options-general.php?page=wpvs_settings1,6283.0770.0953.99

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wpvs_settings
    • > Warning in wp-content/plugins/wp-visual-sitemap/wpvs.php+214
    Use of undefined constant value - assumed 'value' (this will throw an Error in a future version of PHP)
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wpvs_settings
    • > Warning in wp-content/plugins/wp-visual-sitemap/wpvs.php+214
    Use of undefined constant text - assumed 'text' (this will throw an Error in a future version of PHP)

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
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

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: front end sitemap, visual sitemap, sitemap

wp-visual-sitemap/wpvs.php 92% from 13 tests

"WP Visual Sitemap" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-visual-sitemap.php" instead of "wpvs.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
Good job! No executable or dangerous file extensions detected7,058 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
CSS633562,792
SVG1002,671
JavaScript369111,070
PHP117392525

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity17.50
▷ Minimum class complexity9.00
▷ Maximum class complexity26.00
Average method complexity6.50
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.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
PNG images were not found in this plugin