84% sitemap-by-click5

Code Review | Sitemap by click5

WordPress plugin Sitemap by click5 scored84%from 54 tests.

About plugin

  • Plugin page: sitemap-by-click5
  • Plugin version: 1.0.42
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3
  • WordPress version: 6.3.1
  • First release: Dec 18, 2019
  • Latest release: Sep 28, 2023
  • Number of updates: 81
  • Update frequency: every 17.1 days
  • Top authors: click5 (100%)

Code review

54 tests

User reviews

26 reviews

Install metrics

10,000+ active /108,788 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 gracefully, with no errors

Server metrics [RAM: ▲1.10MB] [CPU: ▲9.16ms] Passed 4 tests

Server-side resources used by Sitemap by click5
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.57 ▲1.1154.27 ▲10.66
Dashboard /wp-admin4.42 ▲1.0760.94 ▼4.52
Posts /wp-admin/edit.php4.46 ▲1.1163.18 ▲15.97
Add New Post /wp-admin/post-new.php7.01 ▲1.12119.12 ▲14.51
Media Library /wp-admin/upload.php4.36 ▲1.1358.72 ▲17.11

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 40 new files
Database: no new tables, 19 new options
New WordPress options
click5_sitemap_order_list3
click5_sitemap_custom_sorting
click5_sitemap_order_list2
click5_sitemap_html_blog_sort_by
click5_sitemap_seo_auto
click5_sitemap_blacklisted_array
click5_sitemap_first_load
widget_recent-comments
auto_update_plugins
db_upgraded
...

Browser metrics Passed 4 tests

An overview of browser requirements for Sitemap by click5
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲6013.20 ▼1.281.87 ▼0.0843.40 ▼2.25
Dashboard /wp-admin2,237 ▲435.91 ▲0.06108.27 ▲1.1537.56 ▼0.18
Posts /wp-admin/edit.php2,116 ▲132.04 ▲0.0035.02 ▼2.4233.55 ▼4.43
Add New Post /wp-admin/post-new.php1,539 ▲817.57 ▼5.90642.72 ▼28.0845.83 ▼19.57
Media Library /wp-admin/upload.php1,419 ▲194.23 ▲0.04106.11 ▼9.4349.25 ▲0.75

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 19 options in the database
    • click5_sitemap_first_load
    • widget_recent-posts
    • widget_theysaidso_widget
    • click5_sitemap_robots_exist
    • auto_update_plugins
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • click5_sitemap_html_blog_order_by
    • click5_sitemap_seo_blacklisted_array
    • ...

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 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
Almost there! Just fix the following items
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/sitemap-by-click5/api.php:1102
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/sitemap-by-click5/sitemap-by-click5.php on line 16
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/sitemap-by-click5/sitemap-by-click5.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/sitemap-by-click5/api.php:1102
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/sitemap-by-click5/sitemap-by-click5.php on line 16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: sitemap, xml sitemap, google sitemap, html sitemap, click5...

sitemap-by-click5/sitemap-by-click5.php Passed 13 tests

The principal PHP file in "Sitemap by click5" v. 1.0.42 is loaded by WordPress automatically on each request
60 characters long description:
Generate and customize HTML & XML sitemaps for your website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin10,421 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP31,3181,0665,508
JavaScript76191352,918
PO File64504501,088
CSS512311632
XSLT280275

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity98.00
▷ Minimum class complexity25.00
▷ Maximum class complexity171.00
Average method complexity7.85
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods27
▷ Static methods00.00%
▷ Public methods27100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions127
▷ Named functions10381.10%
▷ Anonymous functions2418.90%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
7 PNG files occupy 1.49MB with 0.84MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-1544x500.png73.41KB41.56KB▼ 43.38%
assets/screenshot-1.png394.38KB146.60KB▼ 62.83%
assets/banner-772x250.png54.31KB23.81KB▼ 56.16%
assets/baner-v01c.png83.68KB33.21KB▼ 60.31%
assets/banner-300x515-sitemap-plugin.png142.17KB59.35KB▼ 58.25%