94% advanced-sitemap-generator

Code Review | Advanced Sitemap Generator

WordPress plugin Advanced Sitemap Generator scored 94% from 54 tests.

About plugin

  • Plugin page: advanced-sitemap-...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9.1-3.9.1
  • WordPress version: 5.9.2
  • First release: Jan 15, 2013
  • Latest release: Aug 13, 2014
  • Number of updates: 31
  • Update frequency: every 18.6 days
  • Top authors: sparxit (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

1,000+ active / 20,237 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.01MB] [CPU: ▼285.84ms] Passed 4 tests

Analyzing server-side resources used by Advanced Sitemap Generator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0254.55 ▲7.48
Dashboard /wp-admin3.43 ▲0.0234.92 ▲2.04
Posts /wp-admin/edit.php3.66 ▲0.0239.95 ▲1.87
Add New Post /wp-admin/post-new.php6.90 ▼0.0895.23 ▼1,150.91
Media Library /wp-admin/upload.php3.31 ▲0.0227.87 ▲3.64
sitemap /wp-admin/options-general.php?page=sitemapgenerator3.2827.66

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Sitemap Generator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,768 ▲4616.23 ▲0.275.82 ▲0.142.33 ▲0.21
Dashboard /wp-admin2,890 ▲326.16 ▼0.00120.16 ▼14.03153.57 ▼8.98
Posts /wp-admin/edit.php2,696 ▲53.23 ▼0.0064.43 ▲0.52144.42 ▼1.20
Add New Post /wp-admin/post-new.php1,664 ▲316.41 ▲0.09404.97 ▼4.13157.61 ▼6.41
Media Library /wp-admin/upload.php1,700 ▼15.52 ▼0.01160.42 ▲20.15191.56 ▲2.44
sitemap /wp-admin/options-general.php?page=sitemapgenerator1,0592.3755.09191.51

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-sitemap-generator/main.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: posts sitemap, sitemap, exclude category posts, sitemap shortcode, page sitemap...

advanced-sitemap-generator/main.php 92% from 13 tests

The principal PHP file in "Advanced Sitemap Generator" v. 1.1.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("advanced-sitemap-generator.php" instead of "main.php")

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
Success! There were no dangerous files found in this plugin127 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11111127

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin