67% wp-disable-sitemap

Code Review | WP Disable Sitemap

WordPress plugin WP Disable Sitemap scored67%from 54 tests.

About plugin

  • Plugin page: wp-disable-sitemap
  • Plugin version: 1.1.6.5
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.3
  • WordPress version: 6.3.1
  • First release: Aug 14, 2020
  • Latest release: Jul 31, 2023
  • Number of updates: 37
  • Update frequency: every 29.2 days
  • Top authors: Litonice13 (54.05%)itsariful (48.65%)

Code review

54 tests

User reviews

1 review

Install metrics

600+ active /4,623 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲4.91MB] [CPU: ▲21.80ms] 75% from 4 tests

This is a short check of server-side resources used by WP Disable Sitemap
Please fix the following
  • CPU: Try to keep total CPU usage under 500.00ms (currently 1,062.25ms on /wp-admin/admin.php?page=wp-disable-sitemap)
PageMemory (MB)CPU Time (ms)
Home /8.74 ▲5.2860.22 ▲20.29
Dashboard /wp-admin8.76 ▲5.4566.83 ▲18.02
Posts /wp-admin/edit.php8.76 ▲5.4074.78 ▲29.16
Add New Post /wp-admin/post-new.php9.39 ▲3.51103.90 ▲19.97
Media Library /wp-admin/upload.php8.76 ▲5.5361.71 ▲28.93
WP Disable Sitemap /wp-admin/admin.php?page=wp-disable-sitemap8.761,062.25
Freemius Debug [v.2.4.2] /wp-admin/admin.php?page=freemius8.7650.81

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 338 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
fs_debug_mode
theysaidso_admin_options
fs_accounts
can_compress_scripts
fs_gdpr
widget_theysaidso_widget
fs_active_plugins

Browser metrics Passed 4 tests

WP Disable Sitemap: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲8614.47 ▲0.221.64 ▼0.0327.79 ▼23.67
Dashboard /wp-admin2,227 ▲395.77 ▼0.11113.67 ▼2.1345.18 ▲0.08
Posts /wp-admin/edit.php2,110 ▲181.99 ▼0.0338.19 ▲1.9337.16 ▲5.07
Add New Post /wp-admin/post-new.php1,522 ▼1123.41 ▲0.38656.51 ▼20.5254.87 ▼4.19
Media Library /wp-admin/upload.php1,403 ▲184.19 ▼0.0297.07 ▼17.9945.28 ▼0.14
WP Disable Sitemap /wp-admin/admin.php?page=wp-disable-sitemap9782.0926.1049.80
Freemius Debug [v.2.4.2] /wp-admin/admin.php?page=freemius1,0531.7427.3128.72

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/wp-disable-sitemap/lib/includes/class-freemius.php+8552
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 10 options in the database
    • fs_active_plugins
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • fs_gdpr
    • fs_accounts
    • fs_debug_mode
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% 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 output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-disable-sitemap/lib/templates/ajax-loader.php
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-disable-sitemap/lib/templates/account/partials/addon.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freemius() in wp-content/plugins/wp-disable-sitemap/lib/templates/partials/network-activation.php:6
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/wp-disable-sitemap/lib/templates/account/partials/addon.php on line 7
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/wp-disable-sitemap/lib/templates/account/partials/addon.php on line 6
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/wp-disable-sitemap/lib/templates/account/partials/addon.php on line 8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-disable-sitemap/lib/templates/account/partials/addon.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/wp-disable-sitemap/lib/templates/account/partials/addon.php:9
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-disable-sitemap/lib/templates/account/partials/addon.php on line 6

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 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (WP Disable Sitemap) image missing
You can take inspiration from this readme.txt

wp-disable-sitemap/wp-disable-sitemap.php 92% from 13 tests

The principal PHP file in "WP Disable Sitemap" v. 1.1.6.5 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin60,499 lines of code in 208 files:
LanguageFilesBlank linesComment linesLines of code
PHP18314,50031,02760,280
JavaScript33459194
CSS220025

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
The following items need your attention
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity90.74
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.61
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes94
▷ Abstract classes44.26%
▷ Concrete classes9095.74%
▷ Final classes00.00%
Methods2,395
▷ Static methods37115.49%
▷ Public methods1,66669.56%
▷ Protected methods321.34%
▷ Private methods69729.10%
Functions192
▷ Named functions192100.00%
▷ Anonymous functions00.00%
Constants268
▷ Global constants19673.13%
▷ Class constants7226.87%
▷ Public constants72100.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
5 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
lib/assets/img/wp-disable-sitemap.png3.12KB2.85KB▼ 8.43%
lib/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%