78% disable-wp-sitemap

Code Review | Disable Sitemap (Deactivate Sitemap) WordPress Plugin

WordPress plugin Disable Sitemap (Deactivate Sitemap) WordPress Plugin scored78%from 54 tests.

About plugin

  • Plugin page: disable-wp-sitemap
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.3
  • WordPress version: 6.3.1
  • First release: Aug 14, 2020
  • Latest release: Oct 17, 2023
  • Number of updates: 61
  • Update frequency: every 19.0 days
  • Top authors: sminozzi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /1,634 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼1.88ms] Passed 4 tests

Server-side resources used by Disable Sitemap (Deactivate Sitemap) WordPress Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0134.36 ▼0.83
Dashboard /wp-admin3.40 ▲0.1043.62 ▼2.08
Posts /wp-admin/edit.php3.51 ▲0.1646.45 ▲1.40
Add New Post /wp-admin/post-new.php5.98 ▲0.0988.92 ▼6.01
Media Library /wp-admin/upload.php3.32 ▲0.0934.95 ▲2.13

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
bill_show_warnings
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Disable Sitemap (Deactivate Sitemap) WordPress Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲1614.30 ▼0.051.71 ▼0.1342.87 ▲5.80
Dashboard /wp-admin2,211 ▲345.65 ▲0.0080.74 ▼7.5839.43 ▼2.64
Posts /wp-admin/edit.php2,116 ▲162.04 ▲0.0739.54 ▲6.1634.53 ▼2.86
Add New Post /wp-admin/post-new.php1,543 ▲1723.11 ▼0.06617.32 ▼39.0161.20 ▼18.01
Media Library /wp-admin/upload.php1,413 ▲134.10 ▼0.0894.90 ▼11.4644.18 ▼3.95

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • bill_show_warnings
    • 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
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/disable-wp-sitemap/includes/checkup/class_bill_catch_errors.php
    • > /wp-content/plugins/disable-wp-sitemap/disable-sitemap.php
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/disable-wp-sitemap/includes/checkup/bill_class_diagnose.php on line 4
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/disable-wp-sitemap/includes/checkup/bill_class_diagnose.php on line 4
    • > PHP Notice
      Undefined variable: plugin_slug in wp-content/plugins/disable-wp-sitemap/includes/checkup/bill_class_diagnose.php on line 636
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_root() in wp-content/plugins/disable-wp-sitemap/includes/checkup/bill_class_diagnose.php:125
    • > PHP Notice
      Undefined variable: notification_url in wp-content/plugins/disable-wp-sitemap/includes/checkup/bill_class_diagnose.php on line 633
    • > PHP Notice
      Undefined variable: plugin_text_domain in wp-content/plugins/disable-wp-sitemap/includes/checkup/bill_class_diagnose.php on line 635
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/disable-wp-sitemap/includes/checkup/bill_class_diagnose.php on line 4
    • > PHP Notice
      Undefined variable: notification_url2 in wp-content/plugins/disable-wp-sitemap/includes/checkup/bill_class_diagnose.php on line 634

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

readme.txt Passed 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
5 plugin tags: disable, disable wp sitemap, sitemaps, disable sitemap, deactivate sitemap

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

"Disable Sitemap (Deactivate Sitemap) WordPress Plugin" version 1.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("disable-wp-sitemap.php" instead of "disable-sitemap.php")

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 plugin711 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP33474711

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity40.50
▷ Minimum class complexity1.00
▷ Maximum class complexity80.00
Average method complexity6.27
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods320.00%
▷ Public methods1386.67%
▷ Protected methods00.00%
▷ Private methods213.33%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/checkup/bell.png1.07KB0.27KB▼ 74.45%