94% simple-hierarchical-sitemap

Code Review | Simple Hierarchical Sitemap

WordPress plugin Simple Hierarchical Sitemap scored 94% from 54 tests.

About plugin

  • Plugin page: simple-hierarchic...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.1-3.6.1
  • WordPress version: 5.8.1
  • First release: Oct 1, 2013
  • Latest release: Dec 11, 2013
  • Number of updates: 11
  • Update frequency: every 108.7 days
  • Top authors: LordPretender (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active / 4,034 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

Server-side resources used by Simple Hierarchical Sitemap
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1333.69 ▲11.11
Dashboard /wp-admin3.07 ▲0.0239.24 ▲2.36
Posts /wp-admin/edit.php3.13 ▲0.0241.92 ▼5.62
Add New Post /wp-admin/post-new.php5.43 ▼0.0083.86 ▼564.27
Media Library /wp-admin/upload.php3.02 ▲0.0233.49 ▲1.65

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Hierarchical Sitemap
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.83 ▲0.336.94 ▼0.9652.26 ▲4.06
Dashboard /wp-admin2,973 ▲395.90 ▼0.03130.47 ▼14.97106.57 ▼9.81
Posts /wp-admin/edit.php2,739 ▼02.68 ▼0.0164.98 ▼0.2389.50 ▲4.89
Add New Post /wp-admin/post-new.php1,500 ▼2,18718.57 ▼2.20356.59 ▼63.50117.22 ▲13.19
Media Library /wp-admin/upload.php1,810 ▼05.01 ▼0.04155.85 ▲8.46113.54 ▼9.15

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully

Smoke tests 75% 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 no errors were found, this is by no means an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/simple-hierarchical-sitemap/simple-hierarchical-sitemap.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: posts list, posts, pages list, sitemap, seo...

simple-hierarchical-sitemap/simple-hierarchical-sitemap.php 92% from 13 tests

The primary PHP file in "Simple Hierarchical Sitemap" version 1.2 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected87 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2402587

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods240.00%
▷ Protected methods00.00%
▷ Private methods360.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin