84% simple-site-map-page

Code Review | Simple Site Map Page

WordPress plugin Simple Site Map Page scored84%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-6.1
  • WordPress version: 6.3.1
  • First release: Feb 18, 2017
  • Latest release: Nov 23, 2022
  • Number of updates: 20
  • Update frequency: every 105.1 days
  • Top authors: audrasjb (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

5,000+ active /43,429 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
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.24ms] Passed 4 tests

An overview of server-side resources used by Simple Site Map Page
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.70 ▲0.90
Dashboard /wp-admin3.32 ▲0.0243.91 ▼2.46
Posts /wp-admin/edit.php3.37 ▲0.0247.54 ▼3.49
Add New Post /wp-admin/post-new.php5.90 ▲0.0295.59 ▼6.94
Media Library /wp-admin/upload.php3.25 ▲0.0233.14 ▼0.06

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Simple Site Map Page: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.24 ▼1.341.78 ▲0.0944.43 ▲6.93
Dashboard /wp-admin2,206 ▲144.84 ▼0.14108.27 ▼12.2644.40 ▼4.09
Posts /wp-admin/edit.php2,092 ▼02.00 ▼0.0139.43 ▼5.8636.29 ▼0.45
Add New Post /wp-admin/post-new.php1,542 ▲718.16 ▼4.89595.35 ▼56.9161.79 ▲7.61
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.0592.93 ▼10.8742.46 ▲0.91

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 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 just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #3 (Your site map appears under the page's main content.) image missing
The official readme.txt is a good inspiration

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

The principal PHP file in "Simple Site Map Page" v. 1.2.2 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file 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 | There should be no dangerous file extensions present in any WordPress 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

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
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

All PNG images should be compressed to minimize bandwidth usage for end users
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/screenshot-2.png123.08KB35.14KB▼ 71.45%
assets/icon-128x128.png5.68KB2.03KB▼ 64.28%
assets/banner-1544x500.png33.02KB13.04KB▼ 60.51%
assets/icon-256x256.png8.48KB3.12KB▼ 63.25%