84% advanced-sitemap-generator

Code Review | Advanced Sitemap Generator

WordPress plugin Advanced Sitemap Generator scored84%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: 6.3.1
  • 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

800+ active /21,051 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

An overview of server-side resources used by Advanced Sitemap Generator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.39 ▼6.44
Dashboard /wp-admin3.31 ▼0.0448.79 ▼16.38
Posts /wp-admin/edit.php3.36 ▲0.0050.29 ▼0.40
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.91 ▼8.47
Media Library /wp-admin/upload.php3.23 ▲0.0034.87 ▼4.10
sitemap /wp-admin/options-general.php?page=sitemapgenerator3.2031.91

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, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Advanced Sitemap Generator: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.27 ▼0.101.55 ▼0.4040.24 ▼2.93
Dashboard /wp-admin2,202 ▲225.66 ▼0.0390.52 ▼5.9439.29 ▼2.65
Posts /wp-admin/edit.php2,104 ▲42.03 ▼0.0233.81 ▼1.9335.29 ▼1.81
Add New Post /wp-admin/post-new.php1,553 ▲823.36 ▼0.02661.30 ▼22.1052.93 ▲3.10
Media Library /wp-admin/upload.php1,401 ▲14.23 ▲0.0197.70 ▼9.0441.45 ▼5.50
sitemap /wp-admin/options-general.php?page=sitemapgenerator8412.1325.3025.47

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% 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 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
Please take a closer look at the following
  • 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 a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: sitemap, page sitemap, simple sitemap, posts sitemap, sitemap shortcode...

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

This is the main PHP file of "Advanced Sitemap Generator" version 1.1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: The principal 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 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable 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
No complexity issues detected
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

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