84% sitemap-html-generator

Code Review | Sitemap HTML Generator

WordPress plugin Sitemap HTML Generator scored84%from 54 tests.

About plugin

  • Plugin page: sitemap-html-gene...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: Oct 7, 2021
  • Latest release: Jul 21, 2023
  • Number of updates: 10
  • Update frequency: every 65.2 days
  • Top authors: siriusproio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,147 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Sitemap HTML Generator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.72 ▼1.56
Dashboard /wp-admin3.32 ▼0.0246.45 ▼12.85
Posts /wp-admin/edit.php3.38 ▲0.0246.01 ▼8.39
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.99 ▼10.69
Media Library /wp-admin/upload.php3.25 ▲0.0236.07 ▼0.93
Sitemap HTML /wp-admin/options-general.php?page=sp_wordpress_html_sitemap_generator_slug3.2133.15

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Sitemap HTML Generator
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.35 ▲0.011.75 ▲0.0544.75 ▲5.99
Dashboard /wp-admin2,196 ▲255.51 ▼0.0681.55 ▼3.8138.24 ▼5.45
Posts /wp-admin/edit.php2,104 ▲41.94 ▼0.0433.31 ▼5.8737.44 ▲2.83
Add New Post /wp-admin/post-new.php1,531 ▼023.01 ▼0.45693.47 ▲34.1162.14 ▲7.25
Media Library /wp-admin/upload.php1,401 ▼24.21 ▲0.0393.09 ▼5.5740.88 ▼7.70
Sitemap HTML /wp-admin/options-general.php?page=sp_wordpress_html_sitemap_generator_slug7942.0323.4325.71

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means 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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/sitemap-html-generator/sitemap-html-generator.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/sitemap-html-generator/sitemap-html.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (11 tag instead of maximum 10)
The official readme.txt is a good inspiration

sitemap-html-generator/sitemap-html-generator.php Passed 13 tests

The entry point to "Sitemap HTML Generator" version 1.0 is a PHP file that has certain tags in its header comment area
107 characters long description:
Use a shortcode [sp_sitemap_html] to display anywhere HTML sitemap with all your WordPress posts and pages.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected137 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23713137

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
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%
Functions6
▷ Named functions6100.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
There are no PNG files in this plugin