10% ts-tree

Code Review | ts-tree

WordPress plugin ts-tree scored 10% from 54 tests.

About plugin

  • Plugin page: ts-tree
  • Plugin version: Version 0.1.1...
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-4.4.3
  • WordPress version: 6.3.1
  • First release: Jun 11, 2016
  • Latest release: Jun 18, 2016
  • Number of updates: 10
  • Update frequency: every 1.5 days
  • Top authors: tsecher (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,033 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/ts-tree/class/Admin/Admin_Screen.class.php+43
    Undefined index: page

Server metrics [RAM: ▼1.90MB] [CPU: ▼52.71ms] Passed 4 tests

An overview of server-side resources used by ts-tree
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.57 ▼4.32
Dashboard /wp-admin2.05 ▼1.266.76 ▼43.69
Posts /wp-admin/edit.php2.05 ▼1.315.60 ▼46.51
Add New Post /wp-admin/post-new.php2.05 ▼3.845.08 ▼92.65
Media Library /wp-admin/upload.php2.05 ▼1.186.25 ▼27.98
Tree /wp-admin/edit.php?page=ts-tree-plugin3.2631.03

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

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

Browser metrics Passed 4 tests

A check of browser resources used by ts-tree
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲5114.78 ▲0.421.79 ▼0.3544.20 ▼1.45
Dashboard /wp-admin2,211 ▲264.87 ▼1.02101.24 ▼13.0241.97 ▼4.33
Posts /wp-admin/edit.php2,097 ▲82.04 ▲0.0636.80 ▼2.1130.92 ▼4.52
Add New Post /wp-admin/post-new.php1,521 ▲723.33 ▲5.82656.86 ▼20.1853.75 ▼15.67
Media Library /wp-admin/upload.php1,399 ▲114.16 ▼0.0894.40 ▼17.1641.27 ▼7.54
Tree /wp-admin/edit.php?page=ts-tree-plugin6811.356.3020.26

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/ts-tree/class/Admin/Admin_Screen.class.php+43
    Undefined index: page
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • recovery_mode_email_last_sent
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/edit.php?page=ts-tree-plugin
    • > Error in wp-content/plugins/ts-tree/class/Admin/Admin_Tree.class.php+32
    Uncaught Error: Class 'tstree\Tools_Categories' not found in wp-content/plugins/ts-tree/class/Admin/Admin_Tree.class.php:32
    Stack trace:
    #0 wp-content/plugins/ts-tree/class/Admin/Admin_Tree.class.php(21): tstree\Admin_Tree->getTree()
    #1 wp-content/plugins/ts-tree/class/Admin/Admin_Screen.class.php(90): tstree\Admin_Tree->__construct()
    #2 wp-includes/class-wp-hook.php(310): tstree\Admin_Screen->content_page()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/admin.php(259): do_action()
    #6 wp-admin/edit.php(10): require_once('/var/www/wordpr...')
    #7 {main}
    thrown

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
Please fix the following items
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/ts-tree/class/Tools/Tools_Categories.class.php
    • > /wp-content/plugins/ts-tree/tpls/list.php
    • > /wp-content/plugins/ts-tree/tpls/tree.php
    • > /wp-content/plugins/ts-tree/tpls/tree-part.php

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 90% from 29 tests

readme.txt 88% from 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
These attributes need your attention:
  • Donate link: Please fix this invalid URI: ""
  • Plugin Name: Please specify the plugin name on the first line ( === ts-tree === )
You can look at the official readme.txt

ts-tree/ts-tree.php 92% from 13 tests

The entry point to "ts-tree" version Version 0.1.1... is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Version: The version number should be digits and periods (ex. "1.0.3" instead of "Version 0.1.1...")

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 plugin1,689 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript314647619
PHP10111102551
CSS23411458
PO File1222261

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity8.00
▷ Minimum class complexity4.00
▷ Maximum class complexity15.00
Average method complexity1.76
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods37
▷ Static methods12.70%
▷ Public methods3286.49%
▷ Protected methods513.51%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
20 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/white_publish.png0.23KB0.18KB▼ 21.76%
css/images/white_future.png0.33KB0.25KB▼ 24.41%
images/white_private.png0.28KB0.22KB▼ 22.49%
images/gray_private.png0.31KB0.22KB▼ 28.89%
images/white_future.png0.33KB0.25KB▼ 24.41%