10% wp-moo-tree

Code Review | Wordpress MooTools Tree Creator

WordPress plugin Wordpress MooTools Tree Creator scored10%from 54 tests.

About plugin

  • Plugin page: wp-moo-tree
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9
  • WordPress version: 6.3.1
  • First release: Sep 19, 2012
  • Latest release: Nov 23, 2017
  • Number of updates: 12
  • Update frequency: every 157.6 days
  • Top authors: dunar21 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /4,860 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
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/wp-moo-tree/tree-shortcode.php+122
    Declaration of Mootree_walker::start_el(&$output, $page, $depth, $args, $current_page = 0) should be compatible with Walker_Page::start_el(&$output, $data_object, $depth = 0, $args = Array, $current_object_id = 0)

Server metrics [RAM: ▼1.97MB] [CPU: ▼58.64ms] Passed 4 tests

A check of server-side resources used by Wordpress MooTools Tree Creator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.445.76 ▼35.04
Dashboard /wp-admin2.05 ▼1.306.05 ▼60.53
Posts /wp-admin/edit.php2.05 ▼1.316.32 ▼45.48
Add New Post /wp-admin/post-new.php2.05 ▼3.845.90 ▼93.49
Media Library /wp-admin/upload.php2.05 ▼1.186.54 ▼29.78
Tree Categories /wp-admin/edit-tags.php?taxonomy=tree-categories&post_type=mootree2.056.77
All Branches /wp-admin/edit.php?post_type=mootree2.056.68
Add New Branch /wp-admin/post-new.php?post_type=mootree2.056.72
WP Moo Tree /wp-admin/options-general.php?page=wp-moo-tree-dimad2.058.32

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 64 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Wordpress MooTools Tree Creator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,924 ▲17813.71 ▼0.677.42 ▲5.6440.78 ▼2.40
Dashboard /wp-admin2,246 ▲584.87 ▼0.02100.16 ▼14.3641.52 ▼1.22
Posts /wp-admin/edit.php2,129 ▲401.99 ▲0.0041.80 ▲2.8936.88 ▲0.91
Add New Post /wp-admin/post-new.php1,562 ▲4323.28 ▲0.22625.38 ▼18.4450.13 ▼1.14
Media Library /wp-admin/upload.php1,428 ▲434.23 ▲0.0495.87 ▼30.9041.38 ▼8.33
Tree Categories /wp-admin/edit-tags.php?taxonomy=tree-categories&post_type=mootree1,5272.1526.8132.83
All Branches /wp-admin/edit.php?post_type=mootree1,0932.0031.9232.55
Add New Branch /wp-admin/post-new.php?post_type=mootree1,9643.5464.8537.11
WP Moo Tree /wp-admin/options-general.php?page=wp-moo-tree-dimad1,1141.7127.1378.53

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/wp-moo-tree/tree-shortcode.php+122
    Declaration of Mootree_walker::start_el(&$output, $page, $depth, $args, $current_page = 0) should be compatible with Walker_Page::start_el(&$output, $data_object, $depth = 0, $args = Array, $current_object_id = 0)
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 25% 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
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-moo-tree-dimad
    • > Warning in wp-content/plugins/wp-moo-tree/tree-shortcode.php+122
    Declaration of Mootree_walker::start_el(&$output, $page, $depth, $args, $current_page = 0) should be compatible with Walker_Page::start_el(&$output, $data_object, $depth = 0, $args = Array, $current_object_id = 0)
    • > GET request to /wp-admin/post-new.php?post_type=mootree
    • > Notice in wp-content/plugins/wp-moo-tree/tree-type.php+234
    Undefined index: mt_branch_miscellaneous

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
  • 3× 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-moo-tree/tree-type.php:46
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_page' not found in wp-content/plugins/wp-moo-tree/tree-shortcode.php:120
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-moo-tree/wp-moo-tree.php:47

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/post-new.php?post_type=mootree
    • > Network (severe)
    wp-content/plugins/wp-moo-tree/images/bg-input.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: You are using too many tags: 14 tag instead of maximum 10
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wp-moo-tree === )
You can look at the official readme.txt

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

This is the main PHP file of "Wordpress MooTools Tree Creator" version 1.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
61 characters long description:
Generates file, geneology, etc., trees via custom post types.

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Please make sure to remedy the following
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/wp-moo-tree/docs/make_docs.bat
2,492 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript6359415927
CSS417453724
PHP4137139692
HTML22261218144
DOS Batch1005

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity33.00
▷ Minimum class complexity33.00
▷ Maximum class complexity33.00
Average method complexity17.00
▷ Minimum method complexity7.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
imgs/colexp.png13.53KB5.12KB▼ 62.12%
imgs/treeicon16.png1.80KB0.87KB▼ 51.57%
imgs/treeicon32.png3.69KB1.66KB▼ 55.08%