79% wp-sitemaps-config

Code Review | WP Sitemaps Config

WordPress plugin WP Sitemaps Config scored79%from 54 tests.

About plugin

  • Plugin page: wp-sitemaps-config
  • Plugin version: 2.2.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.3
  • WordPress version: 6.3.1
  • First release: Sep 2, 2020
  • Latest release: Aug 20, 2023
  • Number of updates: 23
  • Update frequency: every 47.0 days
  • Top authors: kybernetikservices (78.26%)Hinjiriyo (26.09%)

Code review

54 tests

User reviews

8 reviews

Install metrics

500+ active /4,436 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.20MB] [CPU: ▼4.81ms] Passed 4 tests

A check of server-side resources used by WP Sitemaps Config
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1839.17 ▲0.70
Dashboard /wp-admin3.50 ▲0.2046.03 ▼1.42
Posts /wp-admin/edit.php3.62 ▲0.2648.52 ▲3.37
Add New Post /wp-admin/post-new.php6.09 ▲0.2085.74 ▼17.16
Media Library /wp-admin/upload.php3.43 ▲0.2035.66 ▼1.35
XML Sitemap /wp-admin/options-general.php?page=wp-sitemaps-config3.4030.45

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by WP Sitemaps Config
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.27 ▼0.121.79 ▲0.2345.51 ▲3.56
Dashboard /wp-admin2,199 ▲195.61 ▼0.0191.32 ▲4.1346.08 ▲2.05
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0235.27 ▼1.7640.71 ▲7.79
Add New Post /wp-admin/post-new.php6,349 ▲4,82125.89 ▲2.89885.22 ▲202.6458.85 ▲6.29
Media Library /wp-admin/upload.php1,404 ▲74.18 ▼0.0293.20 ▼0.7742.63 ▼1.32
XML Sitemap /wp-admin/options-general.php?page=wp-sitemaps-config9512.0022.5428.24

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-sitemaps-config/public/partials/wp-sitemaps-config-public-display.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wp-sitemaps-config/admin/partials/wp-sitemaps-config-admin-display.php:23

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 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
5 plugin tags: sitemap, configuration, wordpress sitemap, sitemaps, xml sitemap

wp-sitemaps-config/wp-sitemaps-config.php Passed 13 tests

The main PHP file in "WP Sitemaps Config" ver. 2.2.1 adds more information about the plugin and also serves as the entry point for this plugin
77 characters long description:
Provides options to control all XML sitemaps generated by the WordPress core.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin960 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP11266982855
CSS241181
Markdown19018
JavaScript24546

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity16.83
▷ Minimum class complexity1.00
▷ Maximum class complexity58.00
Average method complexity3.07
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods46
▷ Static methods24.35%
▷ Public methods3984.78%
▷ Protected methods00.00%
▷ Private methods715.22%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants337.50%
▷ Class constants562.50%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/images/icon-128x128.png9.25KB3.70KB▼ 60.04%