77% xml-sitemap-feed

Code Review | XML Sitemap & Google News

WordPress plugin XML Sitemap & Google News scored77%from 54 tests.

About plugin

  • Plugin page: xml-sitemap-feed
  • Plugin version: 5.3.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3
  • WordPress version: 6.3.1
  • First release: Sep 26, 2009
  • Latest release: Aug 10, 2023
  • Number of updates: 471
  • Update frequency: every 10.8 days
  • Top authors: RavanH (82.38%)deployer (17.83%)

Code review

54 tests

User reviews

78 reviews

Install metrics

100,000+ active /2,709,127 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
Install script ran successfully

Server metrics [RAM: ▲0.36MB] [CPU: ▲0.27ms] Passed 4 tests

An overview of server-side resources used by XML Sitemap & Google News
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1842.97 ▲3.48
Dashboard /wp-admin3.77 ▲0.4654.31 ▼2.38
Posts /wp-admin/edit.php3.82 ▲0.4656.60 ▲3.26
Add New Post /wp-admin/post-new.php6.29 ▲0.4093.37 ▼3.27
Media Library /wp-admin/upload.php3.63 ▲0.4045.31 ▲8.06
XML Sitemap /wp-admin/options-general.php?page=xmlsf3.6540.21

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 107 new files
Database: no new tables, 16 new options
New WordPress options
xmlsf_urls
xmlsf_post_types
theysaidso_admin_options
xmlsf_taxonomy_settings
xmlsf_author_settings
xmlsf_taxonomies
widget_recent-posts
widget_theysaidso_widget
db_upgraded
xmlsf_custom_sitemaps
...

Browser metrics Passed 4 tests

XML Sitemap & Google News: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.34 ▼0.061.77 ▼0.0744.53 ▲4.30
Dashboard /wp-admin2,196 ▲195.63 ▲0.0487.64 ▼15.0841.70 ▼2.27
Posts /wp-admin/edit.php2,104 ▲42.04 ▲0.0536.07 ▼7.6334.54 ▼2.46
Add New Post /wp-admin/post-new.php6,248 ▲4,71126.17 ▲7.86863.21 ▲187.0963.49 ▼11.69
Media Library /wp-admin/upload.php1,401 ▼24.21 ▲0.04101.20 ▲4.1040.31 ▼0.64
XML Sitemap /wp-admin/options-general.php?page=xmlsf1,4752.1730.1729.97

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • xmlsf_authors
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
Almost there! Just fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/xml-sitemap-feed/views/_usage.php
    • > /wp-content/plugins/xml-sitemap-feed/views/_generator.php
  • 82× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      Use of undefined constant XMLSF_DIR - assumed 'XMLSF_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/xml-sitemap-feed/views/admin/page-sitemap.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/xml-sitemap-feed/views/admin/field-news-hierarchical.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/xml-sitemap-feed/views/admin/help-tab-news.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'XMLSF_Admin' not found in wp-content/plugins/xml-sitemap-feed/controllers/class.xmlsf-admin-sitemap.php:3
    • > PHP Warning
      include(XMLSF_DIR/assets/admin.css): failed to open stream: No such file or directory in wp-content/plugins/xml-sitemap-feed/views/admin/page-sitemap-news.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function checked() in wp-content/plugins/xml-sitemap-feed/views/admin/meta-box-news.php:3
    • > PHP Notice
      Trying to get property 'name' of non-object in wp-content/plugins/xml-sitemap-feed/views/admin/field-sitemap-post-type.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/xml-sitemap-feed/views/admin/notice-ad-insterter-feed.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/xml-sitemap-feed/views/admin/section-advanced-intro.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/xml-sitemap-feed/views/admin/notice-seoframework-sitemap.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
The official readme.txt is a good inspiration

xml-sitemap-feed/xml-sitemap.php 69% from 13 tests

"XML Sitemap & Google News" version 5.3.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 329 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("xml-sitemap-feed.php" instead of "xml-sitemap.php")
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.4" instead of "4.6")
  • Requires PHP: The required version number did not match the one declared in readme.txt ("5.4" instead of "5.6")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected4,729 lines of code in 102 files:
LanguageFilesBlank linesComment linesLines of code
PHP899961,5294,164
XSLT1200546
CSS10019

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity29.08
▷ Minimum class complexity1.00
▷ Maximum class complexity68.00
Average method complexity4.24
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods99
▷ Static methods2020.20%
▷ Public methods9494.95%
▷ Protected methods00.00%
▷ Private methods55.05%
Functions82
▷ Named functions6174.39%
▷ Anonymous functions2125.61%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin