77% really-simple-xml-and-html-sitemap

Code Review | Really Simple XML and HTML Sitemap

WordPress plugin Really Simple XML and HTML Sitemap scored77%from 54 tests.

About plugin

  • Plugin page: really-simple-xml...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Jan 2, 2020
  • Latest release: Apr 19, 2023
  • Number of updates: 23
  • Update frequency: every 52.4 days
  • Top authors: sumon086 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /5,801 total downloads

Benchmarks

Plugin footprint 82% 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.02MB] [CPU: ▼6.74ms] Passed 4 tests

This is a short check of server-side resources used by Really Simple XML and HTML Sitemap
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.58 ▼5.11
Dashboard /wp-admin3.33 ▲0.0249.61 ▼5.99
Posts /wp-admin/edit.php3.38 ▲0.0250.43 ▼1.59
Add New Post /wp-admin/post-new.php5.93 ▲0.0490.16 ▼14.28
Media Library /wp-admin/upload.php3.25 ▲0.0238.77 ▲1.92

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

A short overview of filesystem and database impact
Please fix the following
  • There were 1 file (0.35KB) illegally modified outside of "wp-content/plugins/really-simple-xml-and-html-sitemap/" and "wp-content/uploads/"
    • (new file) sitemap.xml
Filesystem: 26 new files
Database: no new tables, 7 new options
New WordPress options
rsxh-exclude-post-type
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Really Simple XML and HTML Sitemap
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,888 ▲12713.52 ▼0.807.72 ▲5.6938.00 ▼3.58
Dashboard /wp-admin2,211 ▲365.60 ▼0.0788.13 ▼13.4539.99 ▼2.35
Posts /wp-admin/edit.php2,116 ▲192.05 ▲0.0436.75 ▼0.2437.66 ▲3.32
Add New Post /wp-admin/post-new.php1,545 ▲1923.11 ▲5.45666.33 ▼39.6954.45 ▼7.01
Media Library /wp-admin/upload.php1,419 ▲164.22 ▲0.01101.03 ▲1.8643.93 ▼1.59

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% 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)
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/really-simple-xml-and-html-sitemap/admin/partials/really-simple-xml-and-html-sitemap-admin-display.php
    • > /wp-content/plugins/really-simple-xml-and-html-sitemap/public/partials/really-simple-xml-and-html-sitemap-public-display.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Really_Simple_XML_And_HTML_Sitemap_Admin' not found in wp-content/plugins/really-simple-xml-and-html-sitemap/admin/templates/rsxh-sitemap-settings.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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
These attributes need to be fixed:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Donate link: Invalid url: "#"
The official readme.txt is a good inspiration

really-simple-xml-and-html-sitemap/really-simple-xml-and-html-sitemap.php 92% from 13 tests

The entry point to "Really Simple XML and HTML Sitemap" version 1.0.2 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 174 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin714 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP13269636683
JavaScript275424
CSS2087

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity8.29
▷ Minimum class complexity1.00
▷ Maximum class complexity34.00
Average method complexity2.55
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods33
▷ Static methods39.09%
▷ Public methods2884.85%
▷ Protected methods00.00%
▷ Private methods515.15%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.16MB with 0.07MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png53.54KB30.54KB▼ 42.96%
assets/screenshot-2.png53.51KB23.75KB▼ 55.61%
assets/screenshot-1.png58.67KB35.30KB▼ 39.84%