68% wp-simple-html-sitemap

Code Review | WordPress Simple HTML Sitemap

WordPress plugin WordPress Simple HTML Sitemap scored68%from 54 tests.

About plugin

  • Plugin page: wp-simple-html-si...
  • Plugin version: 2.3
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Aug 31, 2018
  • Latest release: Nov 30, 2023
  • Number of updates: 17
  • Update frequency: every 112.8 days
  • Top authors: ashishajani (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /9,719 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.24MB] [CPU: ▼3.09ms] Passed 4 tests

This is a short check of server-side resources used by WordPress Simple HTML Sitemap
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2341.17 ▼2.99
Dashboard /wp-admin3.54 ▲0.2348.32 ▲1.20
Posts /wp-admin/edit.php3.65 ▲0.2947.52 ▼0.28
Add New Post /wp-admin/post-new.php6.14 ▲0.2583.01 ▼10.30
Media Library /wp-admin/upload.php3.46 ▲0.2338.97 ▲6.50
Documentation /wp-admin/admin.php?page=wshs_documentation3.4232.02
Posts /wp-admin/admin.php?page=wshs_post_list3.4331.96
Pages /wp-admin/admin.php?page=wshs_page_list3.4326.68
Saved Shortcodes /wp-admin/admin.php?page=wshs_saved3.4331.84

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 34 new files
Database: 1 new table, 7 new options
New tables
wp_wshs_saved_code
New WordPress options
db_upgraded
wshs_db_version
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

WordPress Simple HTML Sitemap: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲7414.23 ▼0.031.66 ▼0.0945.22 ▼0.00
Dashboard /wp-admin2,229 ▲495.60 ▼0.0493.19 ▼7.4072.95 ▲27.10
Posts /wp-admin/edit.php2,146 ▲462.02 ▼0.0136.38 ▼2.6233.81 ▼3.54
Add New Post /wp-admin/post-new.php1,564 ▲2923.24 ▲4.73716.53 ▲5.3945.05 ▼28.95
Media Library /wp-admin/upload.php1,443 ▲404.14 ▼0.0899.16 ▲0.4872.94 ▲31.12
Documentation /wp-admin/admin.php?page=wshs_documentation1,2331.8529.7438.42
Posts /wp-admin/admin.php?page=wshs_post_list1,2862.0924.9331.79
Pages /wp-admin/admin.php?page=wshs_page_list1,3282.0425.5828.93
Saved Shortcodes /wp-admin/admin.php?page=wshs_saved1,0112.1829.2531.96

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie tables detected upon uninstall: 1 table
    • wp_wshs_saved_code
  • Zombie WordPress options detected upon uninstall: 7 options
    • wshs_db_version
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% 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 0% 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 perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-simple-html-sitemap/inc/wshs_sidebar.php
    • > /wp-content/plugins/wp-simple-html-sitemap/wordpress_simple_html_sitemap.php
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/wp-simple-html-sitemap/inc/wshs_saved.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-simple-html-sitemap/inc/wshs_admin_view.php:79
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-simple-html-sitemap/inc/wshs_front_view.php:150
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-simple-html-sitemap/inc/wshs_saved.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-simple-html-sitemap/inc/wshs_saved.php on line 3

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

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: post and pages sitemap, simple html sitemap, wordpress sitemap, wordpress html sitemap shortcode, wordpress html sitemap plugin

wp-simple-html-sitemap/wordpress_simple_html_sitemap.php 92% from 13 tests

The principal PHP file in "WordPress Simple HTML Sitemap" v. 2.3 is loaded by WordPress automatically on each request
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 ("wp-simple-html-sitemap.php" instead of "wordpress_simple_html_sitemap.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected2,984 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP81101361,317
JavaScript29673832
CSS312316817
SVG10018

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods480.00%
▷ Protected methods00.00%
▷ Private methods120.00%
Functions26
▷ Named functions2596.15%
▷ Anonymous functions13.85%
Constants7
▷ Global constants7100.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
5 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/fancybox_overlay.png0.98KB0.09KB▼ 90.43%
images/sitemap-icon.png0.53KB0.54KB0.00%
images/fancybox_sprite@2x.png6.40KB5.76KB▼ 9.96%
images/fancybox_sprite.png1.33KB1.42KB0.00%
images/sitemap.png1.27KB0.58KB▼ 54.60%