89% wp-txt-sitemap

Code Review | WP TXT Sitemap

WordPress plugin WP TXT Sitemap scored89%from 54 tests.

About plugin

  • Plugin page: wp-txt-sitemap
  • Plugin version: 1.3
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.4
  • WordPress version: 6.3.1
  • First release: Mar 21, 2020
  • Latest release: Apr 17, 2020
  • Number of updates: 9
  • Update frequency: every 3.1 days
  • Top authors: kuegy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /1,525 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.06MB] [CPU: ▲2,412.49ms] 75% from 4 tests

An overview of server-side resources used by WP TXT Sitemap
Please take the time to fix the following items
  • Extra CPU: The extra CPU usage must be under 200.00ms (currently 2,412.49ms on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /5.76 ▲2.26311,984.03 ▲311,937.43
Dashboard /wp-admin5.76 ▲0.01312,775.90 ▲9,432.67
Posts /wp-admin/edit.php3.53 ▲0.13260.91 ▲215.18
Add New Post /wp-admin/post-new.php5.98 ▲0.0591.80 ▼6.46
Media Library /wp-admin/upload.php3.32 ▲0.0542.98 ▲8.56

Server storage [IO: ▲0.03MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Please fix the following
  • The plugin illegally modified 1 file (0.06KB) outside of "wp-content/plugins/wp-txt-sitemap/" and "wp-content/uploads/"
    • (new file) sitemap.txt
Filesystem: 8 new files
Database: no new tables, 12 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
kuegy_txtsitemap_last_updated
db_upgraded
kuegy_txtsitemap_include_posts
kuegy_txtsitemap_ping_google
kuegy_txtsitemap_include_pages
widget_recent-posts
kuegy_txtsitemap_ping_bing
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP TXT Sitemap
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.35 ▼0.032.07 ▲0.3445.94 ▼3.76
Dashboard /wp-admin2,198 ▲215.64 ▲0.0781.57 ▼7.0141.74 ▲1.45
Posts /wp-admin/edit.php2,100 ▼31.96 ▼0.0431.55 ▼12.6337.04 ▼0.64
Add New Post /wp-admin/post-new.php1,526 ▼1122.12 ▲4.04684.71 ▲24.9350.12 ▼1.11
Media Library /wp-admin/upload.php1,403 ▲34.18 ▲0.03109.29 ▼13.2048.91 ▲1.85

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
10 plugin tags: sitemap plugin, bing, xml sitemap, txt sitemap, sitemap...

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

The main PHP file in "WP TXT Sitemap" ver. 1.3 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Requires at least: The required version number did not match the one declared in readme.txt ("3.0.1" instead of "3.5")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected297 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP44187238
PO File1162359

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG files were detected