83% wp-sitemap-control

Code Review | WP Sitemap Control

WordPress plugin WP Sitemap Control scored 83% from 54 tests.

About plugin

  • Plugin page: wp-sitemap-control
  • Plugin version: 1.0.6
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Nov 25, 2020
  • Latest release: Mar 30, 2023
  • Number of updates: 24
  • Update frequency: every 35.6 days
  • Top authors: iworks (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active / 1,546 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼2.09ms] Passed 4 tests

An overview of server-side resources used by WP Sitemap Control
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1040.12 ▲1.20
Dashboard /wp-admin3.40 ▲0.1049.96 ▼0.19
Posts /wp-admin/edit.php3.52 ▲0.1644.16 ▼1.06
Add New Post /wp-admin/post-new.php5.98 ▲0.1082.73 ▼8.31
Media Library /wp-admin/upload.php3.33 ▲0.1036.54 ▲6.24
Sitemap /wp-admin/options-general.php?page=wpsmc_index3.3535.46

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 34 new files
Database: no new tables, 18 new options
New WordPress options
widget_recent-comments
wpsmc_post_type_page
wpsmc_lastmod
can_compress_scripts
wpsmc_post_type_attachment
wpsmc_taxonomy_post_format
wpsmc_single_page
widget_theysaidso_widget
wpsmc_users
wpsmc_single_post
...

Browser metrics Passed 4 tests

An overview of browser requirements for WP Sitemap Control
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲1714.77 ▼0.061.90 ▲0.1443.13 ▼3.94
Dashboard /wp-admin2,207 ▲15.85 ▲0.06114.18 ▲16.7943.46 ▲5.37
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0034.92 ▲0.4531.73 ▼4.41
Add New Post /wp-admin/post-new.php1,539 ▲2223.42 ▲5.50684.25 ▲6.9155.51 ▼8.36
Media Library /wp-admin/upload.php1,392 ▲14.13 ▼0.1098.95 ▼0.7647.60 ▲1.78
Sitemap /wp-admin/options-general.php?page=wpsmc_index1,4492.9378.3455.65

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • 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)
Good news, no errors were detected

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 fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_parse_args() in wp-content/plugins/wp-sitemap-control/includes/iworks/rate/rate.php:69
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses_post() in wp-content/plugins/wp-sitemap-control/includes/iworks/rate/templates/widgets/support.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses_post() in wp-content/plugins/wp-sitemap-control/includes/iworks/rate/templates/widgets/donate.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wp-sitemap-control/includes/iworks/rate/templates/thanks.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention: You can take inspiration from this readme.txt

wp-sitemap-control/wp-sitemap-control.php 85% from 13 tests

The entry point to "WP Sitemap Control" version 1.0.6 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Requires at least: Required version does not match the one declared in readme.txt ("5.5" instead of "5.0")
  • Requires PHP: Required version does not match the one declared in readme.txt ("7.0" instead of "7.2")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin3,154 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP91757162,418
JavaScript75193380
CSS6199155
Sass180138
SVG21163

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 192)
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity117.50
▷ Minimum class complexity16.00
▷ Maximum class complexity388.00
Average method complexity5.16
▷ Minimum method complexity1.00
▷ Maximum method complexity192.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods112
▷ Static methods10.89%
▷ Public methods7365.18%
▷ Protected methods65.36%
▷ Private methods3329.46%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/iworks/options/assets/styles/images/ui-icons_cc0000_256x240.png4.51KB4.18KB▼ 7.28%
includes/iworks/options/assets/styles/images/ui-icons_ffffff_256x240.png6.33KB4.18KB▼ 33.99%
includes/iworks/options/assets/styles/images/ui-icons_777620_256x240.png4.51KB4.18KB▼ 7.28%
includes/iworks/options/assets/styles/images/ui-icons_777777_256x240.png6.94KB4.18KB▼ 39.78%
includes/iworks/options/assets/styles/images/ui-icons_444444_256x240.png6.92KB4.18KB▼ 39.61%