83% category-d3-tree

Code Review | Category D3 Tree

WordPress plugin Category D3 Tree scored83%from 54 tests.

About plugin

  • Plugin page: category-d3-tree
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 6.3.1
  • First release: Aug 21, 2014
  • Latest release: Dec 4, 2014
  • Number of updates: 23
  • Update frequency: every 4.7 days
  • Top authors: anshi (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /3,847 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
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.62ms] Passed 4 tests

This is a short check of server-side resources used by Category D3 Tree
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0139.24 ▼2.16
Dashboard /wp-admin3.32 ▲0.0149.41 ▼2.26
Posts /wp-admin/edit.php3.37 ▲0.0146.50 ▼7.02
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.25 ▼15.02
Media Library /wp-admin/upload.php3.24 ▲0.0141.46 ▲2.79

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Category D3 Tree
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.42 ▲0.051.80 ▲0.0446.02 ▼0.64
Dashboard /wp-admin2,195 ▲215.52 ▼0.0784.73 ▼6.6643.70 ▼1.20
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0434.77 ▼1.1935.54 ▼3.79
Add New Post /wp-admin/post-new.php1,535 ▲718.22 ▼5.12647.78 ▼24.9371.39 ▲16.46
Media Library /wp-admin/upload.php1,403 ▲64.22 ▼0.0296.99 ▼15.4342.85 ▼0.45

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/category-d3-tree/category_d3_tree.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Add descriptions for screenshots #2, #3 in category-d3-tree/assets to your readme.txt
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === category-d3-tree === )
The official readme.txt is a good inspiration

category-d3-tree/category_d3_tree.php 92% from 13 tests

The primary PHP file in "Category D3 Tree" version 1.1 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("category-d3-tree.php" instead of "category_d3_tree.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin340 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript48291262
PHP1193162
CSS161516

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.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
PNG images were not found in this plugin