84% xml-sitemaps-manager

Code Review | XML Sitemaps Manager

WordPress plugin XML Sitemaps Manager scored84%from 54 tests.

About plugin

  • Plugin page: xml-sitemaps-manager
  • Plugin version: 0.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.1
  • WordPress version: 6.3.1
  • First release: Jul 1, 2022
  • Latest release: Jul 20, 2023
  • Number of updates: 23
  • Update frequency: every 16.7 days
  • Top authors: RavanH (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /1,555 total downloads

Benchmarks

Plugin footprint 83% 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.05MB] [CPU: ▼8.87ms] Passed 4 tests

This is a short check of server-side resources used by XML Sitemaps Manager
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0838.84 ▲0.85
Dashboard /wp-admin3.37 ▲0.0247.57 ▼10.22
Posts /wp-admin/edit.php3.42 ▲0.0642.73 ▼7.55
Add New Post /wp-admin/post-new.php5.95 ▲0.0680.96 ▼18.56
Media Library /wp-admin/upload.php3.29 ▲0.0636.07 ▲1.78

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 13 new options
New WordPress options
xmlsm_max_urls
can_compress_scripts
widget_recent-comments
xmlsm_version
xmlsm_sitemaps_fixes
theysaidso_admin_options
xmlsm_lastmod
widget_recent-posts
xmlsm_disabled_subtypes
xmlsm_sitemap_providers
...

Browser metrics Passed 4 tests

A check of browser resources used by XML Sitemaps Manager
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▲0.092.12 ▲0.4444.69 ▲3.53
Dashboard /wp-admin2,209 ▲245.85 ▼0.0096.20 ▼5.0037.65 ▼4.97
Posts /wp-admin/edit.php2,086 ▼32.01 ▼0.0135.01 ▼5.1932.83 ▼4.45
Add New Post /wp-admin/post-new.php1,533 ▲923.38 ▲0.16578.03 ▼89.3149.94 ▼9.13
Media Library /wp-admin/upload.php1,385 ▼64.25 ▲0.1197.43 ▼0.2040.52 ▼4.34

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_xml() in wp-content/plugins/xml-sitemaps-manager/src/views/_usage.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/xml-sitemaps-manager/src/views/admin-field.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/xml-sitemaps-manager/src/compat/polylang.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/xml-sitemaps-manager/src/views/admin-help-tab.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

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
3 plugin tags: sitemapxml, sitemap, xml sitemap

xml-sitemaps-manager/xml-sitemaps-manager.php 92% from 13 tests

The main PHP file in "XML Sitemaps Manager" ver. 0.5 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 324 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected813 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP12171555813

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity20.00
▷ Minimum class complexity1.00
▷ Maximum class complexity36.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods32
▷ Static methods2887.50%
▷ Public methods3093.75%
▷ Protected methods00.00%
▷ Private methods26.25%
Functions9
▷ Named functions888.89%
▷ Anonymous functions111.11%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants1100.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
No PNG files were detected