84% sitemap-configurator

Code Review | Sitemap Configurator

WordPress plugin Sitemap Configurator scored84%from 54 tests.

About plugin

  • Plugin page: sitemap-configurator
  • Plugin version: 0.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.7
  • WordPress version: 6.3.1
  • First release: Apr 15, 2021
  • Latest release: Apr 15, 2021
  • Number of updates: 2
  • Update frequency: every 7.5 days
  • Top authors: optimocha (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /353 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.33ms] Passed 4 tests

A check of server-side resources used by Sitemap Configurator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0536.55 ▼0.99
Dashboard /wp-admin3.36 ▲0.0544.21 ▼1.90
Posts /wp-admin/edit.php3.47 ▲0.1148.68 ▲0.61
Add New Post /wp-admin/post-new.php5.96 ▲0.0784.81 ▼15.05
Media Library /wp-admin/upload.php3.28 ▲0.0536.47 ▲2.56
Sitemap Configurator /wp-admin/options-general.php?page=sitemap-configurator3.2730.12

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 105 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
osc_options

Browser metrics Passed 4 tests

Checking browser requirements for Sitemap Configurator
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,005 ▲27015.02 ▲0.661.82 ▼0.1338.89 ▼5.06
Dashboard /wp-admin2,408 ▲2176.52 ▲1.68115.95 ▲7.2647.70 ▲6.05
Posts /wp-admin/edit.php2,234 ▲1453.36 ▲1.3149.34 ▲9.2343.59 ▲6.35
Add New Post /wp-admin/post-new.php1,717 ▲18424.15 ▲1.03738.12 ▲102.3252.94 ▲3.57
Media Library /wp-admin/upload.php1,609 ▲2215.81 ▲1.63107.39 ▲8.7248.98 ▲5.22
Sitemap Configurator /wp-admin/options-general.php?page=sitemap-configurator1,0333.0734.1461.03

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • osc_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

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)
Even though everything seems fine, this is not 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
Please take a closer look at the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/sitemap-configurator/sitemap-configurator.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/sitemap-configurator/views/options.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === sitemap-configurator === )
You can take inspiration from this readme.txt

sitemap-configurator/sitemap-configurator.php Passed 13 tests

The principal PHP file in "Sitemap Configurator" v. 0.9 is loaded by WordPress automatically on each request
54 characters long description:
A tiny plugin to configure the WordPress core sitemap.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin58,965 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript265,6251,25241,612
CSS53,0162916,851
PHP653102312
SVG100190

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity4.50
▷ Minimum class complexity2.00
▷ Maximum class complexity7.00
Average method complexity1.93
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
56 PNG files occupy 1.77MB with 0.95MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/shared-ui/images/chartjs-stats.png11.38KB4.00KB▼ 64.89%
assets/shared-ui/images/anatomy-smart-search.png10.55KB3.58KB▼ 66.07%
assets/shared-ui/images/forminator-create.png9.72KB3.87KB▼ 60.22%
assets/shared-ui/images/plugins-forminator-icon.png5.56KB5.10KB▼ 8.27%
assets/shared-ui/images/beehive-welcome.png44.57KB13.73KB▼ 69.19%