94% simple-site-map-page

Code Review | Simple Site Map Page

WordPress plugin Simple Site Map Page scored 94% from 54 tests.

About plugin

  • Plugin page: simple-site-map-page
  • Plugin version: 1.2.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.9
  • WordPress version: 5.9.2
  • First release: Feb 18, 2017
  • Latest release: Jan 31, 2022
  • Number of updates: 18
  • Update frequency: every 100.3 days
  • Top authors: audrasjb (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

5,000+ active / 32,292 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.01MB] [CPU: ▼295.66ms] Passed 4 tests

Server-side resources used by Simple Site Map Page
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0156.66 ▼4.01
Dashboard /wp-admin3.42 ▲0.0140.71 ▲4.88
Posts /wp-admin/edit.php3.65 ▲0.0144.03 ▲3.24
Add New Post /wp-admin/post-new.php6.89 ▼0.0895.93 ▼1,186.75
Media Library /wp-admin/upload.php3.30 ▲0.0132.10 ▲5.69
Menus /wp-admin/nav-menus.php3.3157.82

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Simple Site Map Page
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,768 ▲1414.69 ▼1.266.78 ▲0.692.38 ▼0.35
Dashboard /wp-admin2,894 ▲406.03 ▼0.07112.34 ▼22.40152.66 ▼10.39
Posts /wp-admin/edit.php2,696 ▲53.24 ▲0.0168.12 ▲4.21144.09 ▼64.13
Add New Post /wp-admin/post-new.php1,664 ▼10916.25 ▼5.56404.22 ▼36.31168.07 ▼15.87
Media Library /wp-admin/upload.php1,700 ▲85.50 ▼0.04132.70 ▼12.34185.93 ▲1.95
Menus /wp-admin/nav-menus.php2,6633.89109.03151.77

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 75% from 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 50% 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
Please fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/simple-site-map-page/public/ssmp-public.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-site-map-page/admin/ssmp-admin.php:43

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: Screenshot #3 (Your site map appears under the page's main content.) image required
The official readme.txt is a good inspiration

simple-site-map-page/ssmp.php 92% from 13 tests

The main file in "Simple Site Map Page" v. 1.2.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("simple-site-map-page.php" instead of "ssmp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected99 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP4157299

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.42
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%
Functions6
▷ Named functions6100.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
6 PNG files occupy 0.23MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png45.77KB12.24KB▼ 73.26%
assets/icon-256x256.png8.48KB3.12KB▼ 63.25%
assets/icon-128x128.png5.68KB2.03KB▼ 64.28%
assets/screenshot-2.png123.08KB35.14KB▼ 71.45%
assets/banner-1544x500.png33.02KB13.04KB▼ 60.51%