83% sitemap-shortcode

Code Review | Sitemap Shortcode

WordPress plugin Sitemap Shortcode scored83%from 54 tests.

About plugin

  • Plugin page: sitemap-shortcode
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.8
  • WordPress version: 6.3.1
  • First release: Jan 16, 2014
  • Latest release: Jan 17, 2014
  • Number of updates: 11
  • Update frequency: every 20.9 days
  • Top authors: arnobprotimroy (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

100+ active /3,118 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.20ms] Passed 4 tests

This is a short check of server-side resources used by Sitemap Shortcode
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.38 ▼19.58
Dashboard /wp-admin3.31 ▲0.0048.59 ▲2.26
Posts /wp-admin/edit.php3.36 ▲0.0046.32 ▲2.85
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.10 ▲4.08
Media Library /wp-admin/upload.php3.23 ▲0.0033.15 ▼2.34

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Sitemap Shortcode
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.16 ▼1.221.80 ▲0.0541.25 ▼5.74
Dashboard /wp-admin2,206 ▲184.86 ▼0.06111.35 ▲1.1142.69 ▼2.88
Posts /wp-admin/edit.php2,092 ▲32.04 ▲0.0240.40 ▲3.5636.09 ▲3.54
Add New Post /wp-admin/post-new.php1,517 ▼317.76 ▼5.55673.65 ▼2.9553.37 ▲2.74
Media Library /wp-admin/upload.php1,391 ▲34.27 ▲0.0895.53 ▼7.5944.43 ▼0.79

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/sitemap-shortcode/sitemap_shortcode.php:56

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)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (Output of the plugin), #2 (Insert anywhere the [sitemap] shortcode)
You can take inspiration from this readme.txt

sitemap-shortcode/sitemap_shortcode.php 85% from 13 tests

This is the main PHP file of "Sitemap Shortcode" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 252 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("sitemap-shortcode.php" instead of "sitemap_shortcode.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin43 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP121143

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.13
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
7 PNG files occupy 0.69MB with 0.35MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
2.png39.04KB20.66KB▼ 47.08%
screenshot-1.png146.37KB66.70KB▼ 54.43%
screenshot-2.png42.42KB20.68KB▼ 51.25%
screenshot-4.png146.37KB66.70KB▼ 54.43%
screenshot-2.png.png39.04KB20.66KB▼ 47.08%