84% wp-page-tree

Code Review | WP Page Tree

WordPress plugin WP Page Tree scored84%from 54 tests.

About plugin

  • Plugin page: wp-page-tree
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.0-4.1.1
  • WordPress version: 6.3.1
  • First release: Nov 19, 2012
  • Latest release: Mar 21, 2015
  • Number of updates: 8
  • Update frequency: every 106.5 days
  • Top authors: invisnet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /3,901 total downloads

Benchmarks

Plugin footprint 83% from 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.00MB] [CPU: ▼7.34ms] Passed 4 tests

Server-side resources used by WP Page Tree
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.76 ▲3.52
Dashboard /wp-admin3.31 ▼0.0346.37 ▼12.75
Posts /wp-admin/edit.php3.37 ▲0.0147.15 ▲5.28
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.09 ▼15.76
Media Library /wp-admin/upload.php3.24 ▲0.0132.73 ▼4.38

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_wp_page_tree
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for WP Page Tree
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲4514.70 ▲0.091.66 ▲0.1646.22 ▲4.99
Dashboard /wp-admin2,195 ▲155.57 ▼0.0882.94 ▼3.6738.94 ▼3.13
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0439.99 ▲5.6134.58 ▲2.75
Add New Post /wp-admin/post-new.php1,528 ▲223.09 ▼0.49669.10 ▼41.7362.19 ▲2.45
Media Library /wp-admin/upload.php1,400 ▲34.20 ▲0.04106.05 ▲10.3845.49 ▲0.29

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_wp_page_tree

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-page-tree/wp-page-tree.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: page tree, site navigation

wp-page-tree/wp-page-tree.php Passed 13 tests

The main PHP file in "WP Page Tree" ver. 1.1.1 adds more information about the plugin and also serves as the entry point for this plugin
44 characters long description:
Widget to display a navigable tree of pages.

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
There were no executable files found in this plugin135 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12422105
CSS13330

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity3.57
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods571.43%
▷ Protected methods228.57%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.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
There were not PNG files found in your plugin