10% easytree

Code Review | EasyTree

WordPress plugin EasyTree scored10%from 54 tests.

About plugin

  • Plugin page: easytree
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.1
  • WordPress version: 6.3.1
  • First release: Feb 23, 2015
  • Latest release: Aug 13, 2015
  • Number of updates: 31
  • Update frequency: every 5.6 days
  • Top authors: damlys (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /2,938 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/easytree/class/class.easytreewidget.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; EasyTreeWidget has a deprecated constructor

Server metrics [RAM: ▼1.86MB] [CPU: ▼54.51ms] Passed 4 tests

This is a short check of server-side resources used by EasyTree
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.12 ▼1.345.34 ▼35.69
Dashboard /wp-admin2.14 ▼1.166.77 ▼43.67
Posts /wp-admin/edit.php2.14 ▼1.216.20 ▼46.58
Add New Post /wp-admin/post-new.php2.14 ▼3.745.93 ▼92.08
Media Library /wp-admin/upload.php2.14 ▼1.095.32 ▼28.30
EasyTree /wp-admin/options-general.php?page=easytree2.145.75

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 56 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_easytreewidget
easytree_option_skin
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for EasyTree
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲11513.43 ▼0.938.39 ▲6.7042.72 ▼5.02
Dashboard /wp-admin2,202 ▲285.62 ▲0.0194.93 ▲3.9741.29 ▲0.82
Posts /wp-admin/edit.php2,101 ▲12.02 ▼0.0234.50 ▼8.0733.28 ▼4.25
Add New Post /wp-admin/post-new.php1,529 ▼1023.27 ▲5.05628.75 ▼7.8373.74 ▲10.99
Media Library /wp-admin/upload.php1,407 ▲104.18 ▲0.0096.94 ▼5.6147.69 ▼0.48
EasyTree /wp-admin/options-general.php?page=easytree1,0232.0125.3128.51

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/easytree/class/class.easytreewidget.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; EasyTreeWidget has a deprecated constructor
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_recent-comments
    • widget_easytreewidget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • easytree_option_skin

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=easytree
    • > Deprecated in wp-content/plugins/easytree/class/class.easytreewidget.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; EasyTreeWidget has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=easytree
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in EasyTreeWidget is deprecated since version 4.3.0! Use __construct() instead.

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
The following issues need your attention
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Category' not found in wp-content/plugins/easytree/class/class.wpeasytreetagswalker.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/easytree/easytree.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Category' not found in wp-content/plugins/easytree/class/class.wpeasytreecategorywalker.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/easytree/class/class.easytreewidget.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% 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
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Options page), #2 (Adding widget), #3 (Widget), #4 (Configuring the `Menu` section in EasyTree)
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

easytree/easytree.php Passed 13 tests

The primary PHP file in "EasyTree" version 1.3 is used by WordPress to initiate all plugin functionality
104 characters long description:
Complete dropdown tree navigation that contain pages, categories with posts, tags, authors and own menu.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin3,036 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
CSS42054921,665
JavaScript214746879
PHP78636418
PO File1275674

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity4.67
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
15 PNG files occupy 0.82MB with 0.38MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png10.56KB4.61KB▼ 56.38%
img/easytree_menu.png4.89KB2.51KB▼ 48.72%
screenshot-1.png68.93KB26.15KB▼ 62.07%
img/programming2.png0.47KB0.40KB▼ 15.63%
img/easytree_dashboard_menu_target.png36.33KB19.07KB▼ 47.51%