10% wp-parsi-navigation-trees

Code Review | WP-Parsi navigation trees

WordPress plugin WP-Parsi navigation trees scored10%from 54 tests.

About plugin

  • Plugin page: wp-parsi-navigati...
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-4.9.8
  • WordPress version: 6.3.1
  • First release: May 1, 2012
  • Latest release: Oct 6, 2018
  • Number of updates: 17
  • Update frequency: every 147.4 days
  • Top authors: man4toman (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

200+ active /16,034 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Widget_Tree_Nav::activate() should not be called statically

Server metrics [RAM: ▼1.71MB] [CPU: ▼50.27ms] Passed 4 tests

This is a short check of server-side resources used by WP-Parsi navigation trees
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.1810.00 ▼34.52
Dashboard /wp-admin2.29 ▼1.0111.77 ▼41.55
Posts /wp-admin/edit.php2.29 ▼1.0610.44 ▼38.56
Add New Post /wp-admin/post-new.php2.29 ▼3.5910.30 ▼86.44
Media Library /wp-admin/upload.php2.29 ▼0.949.83 ▼31.33

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
widget_tree_nav
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for WP-Parsi navigation trees
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,872 ▲8613.50 ▼1.229.94 ▲8.0743.14 ▼2.42
Dashboard /wp-admin2,195 ▲185.50 ▼0.1090.38 ▼7.4438.62 ▼5.62
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0437.56 ▲0.2733.05 ▼3.48
Add New Post /wp-admin/post-new.php1,526 ▼1123.25 ▼0.18675.30 ▲10.2359.86 ▼3.02
Media Library /wp-admin/upload.php1,400 ▼04.21 ▼0.02102.00 ▼2.2142.28 ▼3.86

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Widget_Tree_Nav::register() should not be called statically
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-parsi-navigation-trees/wpp-tree.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (Create Wordpress menu), #2 (Set menu in widget option), #3 (Done)
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

wp-parsi-navigation-trees/wpp-tree.php 92% from 13 tests

The main PHP script in "WP-Parsi navigation trees" version 2.1 is automatically included on every request by WordPress
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 ("wp-parsi-navigation-trees.php" instead of "wpp-tree.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 plugin137 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP1251560
CSS20058
JavaScript19019

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
3 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png6.20KB3.46KB▼ 44.27%
screenshot-3.png5.63KB1.51KB▼ 73.11%
screenshot-1.png27.16KB12.99KB▼ 52.15%