10% simple-page-hierarchy-widget

Code Review | Simple Page Hierarchy Widget

WordPress plugin Simple Page Hierarchy Widget scored10%from 54 tests.

About plugin

  • Plugin page: simple-page-hiera...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-3.8.1
  • WordPress version: 6.3.1
  • First release: Feb 5, 2014
  • Latest release: Feb 5, 2014
  • Number of updates: 12
  • Update frequency: N/A
  • Top authors: joshlimecuda (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

40+ active /1,729 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/simple-page-hierarchy-widget/simple-hierarchy-widget.php+87
    Function create_function() is deprecated

Server metrics [RAM: ▼1.94MB] [CPU: ▼53.70ms] Passed 4 tests

Server-side resources used by Simple Page Hierarchy Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.414.49 ▼36.48
Dashboard /wp-admin2.07 ▼1.234.99 ▼48.42
Posts /wp-admin/edit.php2.07 ▼1.295.77 ▼44.30
Add New Post /wp-admin/post-new.php2.07 ▼3.826.19 ▼85.59
Media Library /wp-admin/upload.php2.07 ▼1.165.17 ▼29.63

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_gb-simple-page-hierarchy
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Page Hierarchy Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2914.63 ▲0.331.69 ▼0.0940.64 ▲0.71
Dashboard /wp-admin2,203 ▲185.85 ▼0.03106.05 ▼2.9441.60 ▼5.64
Posts /wp-admin/edit.php2,089 ▼32.01 ▼0.0540.09 ▲3.3034.84 ▲1.23
Add New Post /wp-admin/post-new.php1,542 ▲318.61 ▼4.85607.91 ▲24.9748.30 ▲0.59
Media Library /wp-admin/upload.php1,388 ▼34.23 ▲0.0194.91 ▼4.4641.45 ▼3.80

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/simple-page-hierarchy-widget/simple-hierarchy-widget.php+87
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_gb-simple-page-hierarchy
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_ID() in wp-content/plugins/simple-page-hierarchy-widget/views/widget.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/simple-page-hierarchy-widget/views/admin.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simple-page-hierarchy-widget/simple-hierarchy-widget.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: parent, grandchild, pages, widgets, heirarchy...

simple-page-hierarchy-widget/simple-hierarchy-widget.php 85% from 13 tests

The main file in "Simple Page Hierarchy Widget" v. 1.0.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("simple-page-hierarchy-widget.php" instead of "simple-hierarchy-widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin103 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP45658103

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png8.25KB3.85KB▼ 53.30%