10% xml-multilanguage-sitemap-generator

Code Review | XML Multilanguage Sitemap Generator

WordPress plugin XML Multilanguage Sitemap Generator scored10%from 54 tests.

About plugin

  • Plugin page: xml-multilanguage...
  • Plugin version: 2.0.6
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.9.5
  • WordPress version: 6.3.1
  • First release: May 14, 2017
  • Latest release: May 15, 2018
  • Number of updates: 80
  • Update frequency: every 4.6 days
  • Top authors: gianemi2 (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

200+ active /6,638 total downloads

Benchmarks

Plugin footprint 57% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • Install procedure had errors
    • > Warning in wp-content/plugins/xml-multilanguage-sitemap-generator/XML sitemap.php+43
    Invalid argument supplied for foreach()

Server metrics [RAM: ▼0.63MB] [CPU: ▼17.46ms] Passed 4 tests

Server-side resources used by XML Multilanguage Sitemap Generator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.66 ▼8.71
Dashboard /wp-admin3.33 ▲0.0350.69 ▼2.63
Posts /wp-admin/edit.php3.38 ▲0.0249.64 ▲1.83
Add New Post /wp-admin/post-new.php3.28 ▼2.6144.25 ▼60.34
Media Library /wp-admin/upload.php3.25 ▲0.0242.23 ▲4.44

Server storage [IO: ▲0.15MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
Please try to fix the following items
  • You have illegally modified 3 files (1.00KB) outside of "wp-content/plugins/xml-multilanguage-sitemap-generator/" and "wp-content/uploads/"
    • (new file) xml-sitemap/category.xml
    • (new file) xml-sitemap/xml_mg_sitemap.xml
    • (new file) xml-sitemap/page.xml
Filesystem: 22 new files
Database: no new tables, 18 new options
New WordPress options
_xmg_changefreq_value
db_upgraded
_xmg_premium_license_key
widget_theysaidso_widget
_xmg_priority_single_value
can_compress_scripts
_xmg_id_excluded
_xmg_useless_posts
_xmg_priority_value
_xmg_is_debug
...

Browser metrics Passed 4 tests

XML Multilanguage Sitemap Generator: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.35 ▼0.371.61 ▼0.3040.10 ▼2.60
Dashboard /wp-admin2,214 ▲405.62 ▲0.0592.71 ▼7.2737.95 ▼7.74
Posts /wp-admin/edit.php2,116 ▲161.98 ▼0.0441.15 ▲1.3535.20 ▼2.17
Add New Post /wp-admin/post-new.php1,539 ▲222.95 ▲4.56693.88 ▲38.8857.11 ▼6.22
Media Library /wp-admin/upload.php1,410 ▲104.24 ▲0.03100.19 ▼7.0844.30 ▼1.35

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 18 options
    • db_upgraded
    • _xmg_priority_value
    • _xmg_sitemap_name
    • widget_theysaidso_widget
    • _xmg_premium_license_key
    • _xmg_post_type_to_include
    • _xmg_version
    • _xmg_changefreq_single_value
    • widget_recent-posts
    • _xmg_is_debug
    • ...

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
Good news, no errors were detected

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
  • 11× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/xml-multilanguage-sitemap-generator/admin/include-admin-style.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function pll_default_language() in wp-content/plugins/xml-multilanguage-sitemap-generator/includes/loop/polylang/polylang-post-type.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/xml-multilanguage-sitemap-generator/includes/option.php:2
    • > PHP Warning
      Use of undefined constant _XMG_PLUGIN_PATH - assumed '_XMG_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/xml-multilanguage-sitemap-generator/includes/functions.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_current_language() on null in wp-content/plugins/xml-multilanguage-sitemap-generator/includes/loop/sitepress/wpml-taxonomies.php:3
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_current_language() on null in wp-content/plugins/xml-multilanguage-sitemap-generator/includes/loop/sitepress/wpml-post-type.php:3
    • > PHP Warning
      require(_XMG_PLUGIN_PATH/admin/include-admin-style.php): failed to open stream: No such file or directory in wp-content/plugins/xml-multilanguage-sitemap-generator/includes/functions.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function pll_default_language() in wp-content/plugins/xml-multilanguage-sitemap-generator/includes/loop/polylang/polylang-taxonomies.php:2
    • > PHP Fatal error
      require(): Failed opening required '_XMG_PLUGIN_PATH/admin/include-admin-style.php' (include_path='.:/usr/share/php') in wp-content/plugins/xml-multilanguage-sitemap-generator/includes/functions.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_terms() in wp-content/plugins/xml-multilanguage-sitemap-generator/includes/loop/notranslate/notranslate-taxonomies.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: wpml, google friendly, polylang, gianemi2, sitemap...

xml-multilanguage-sitemap-generator/XML sitemap.php 85% from 13 tests

The entry point to "XML Multilanguage Sitemap Generator" version 2.0.6 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("xml-multilanguage-sitemap-generator.php" instead of "XML sitemap.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 352 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin2,057 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP131802241,093
CSS1536788
PO File14243120
JavaScript18256

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions37
▷ Named functions37100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
3 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/icon-32x32.png1.47KB1.34KB▼ 8.66%
admin/images/paypal-donate.png5.79KB6.10KB0.00%
admin/images/xml_multilanguage_sitemap_generator_logo.png32.10KB4.27KB▼ 86.71%