84% display-html-sitemap

Code Review | Simple HTML Sitemap

WordPress plugin Simple HTML Sitemap scored84%from 54 tests.

About plugin

  • Plugin page: display-html-sitemap
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4
  • WordPress version: 6.3.1
  • First release: Apr 29, 2017
  • Latest release: Jun 23, 2020
  • Number of updates: 11
  • Update frequency: every 104.7 days
  • Top authors: dipakbbsr (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

2,000+ active /9,531 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
Installer ran successfully

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

Analyzing server-side resources used by Simple HTML Sitemap
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.48 ▲1.75
Dashboard /wp-admin3.32 ▲0.0146.09 ▼16.66
Posts /wp-admin/edit.php3.37 ▲0.0144.90 ▼2.40
Add New Post /wp-admin/post-new.php5.92 ▲0.0391.10 ▼7.96
Media Library /wp-admin/upload.php3.24 ▲0.0134.45 ▼0.89
HTML Sitemap /wp-admin/options-general.php?page=html-sitemap3.2632.03

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-comments
dhswp_active_page
theysaidso_admin_options
widget_theysaidso_widget
dhswp_sortorder
dhswp_active_post
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Simple HTML Sitemap: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲5113.25 ▼1.031.77 ▼0.4543.31 ▼2.07
Dashboard /wp-admin2,214 ▲294.86 ▼0.11107.40 ▼8.6138.01 ▼5.46
Posts /wp-admin/edit.php2,101 ▲122.22 ▲0.2539.31 ▼3.4236.40 ▲0.60
Add New Post /wp-admin/post-new.php1,521 ▼1217.54 ▼5.72668.93 ▼14.5451.07 ▼6.46
Media Library /wp-admin/upload.php1,393 ▲54.24 ▲0.0498.88 ▼7.4542.13 ▼1.69
HTML Sitemap /wp-admin/options-general.php?page=html-sitemap1,0141.9628.0928.97

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 9 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • dhswp_active_post
    • theysaidso_admin_options
    • dhswp_sortorder
    • db_upgraded
    • widget_recent-posts
    • dhswp_active_page

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/display-html-sitemap/display-html-sitemap.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: settings, sitemap, html sitemap, custom post type, post type

display-html-sitemap/display-html-sitemap.php 92% from 13 tests

"Simple HTML Sitemap" version 1.0.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 226 characters long)

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
Everything looks great! No dangerous files found in this plugin413 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2126130301
CSS10083
JavaScript112029

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity31.00
▷ Minimum class complexity31.00
▷ Maximum class complexity31.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/drag.png0.15KB0.14KB▼ 5.23%