73% f4-tree

Code Review | F4 Post Tree

WordPress plugin F4 Post Tree scored73%from 54 tests.

About plugin

  • Plugin page: f4-tree
  • Plugin version: 1.1.15
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-6.2
  • WordPress version: 6.3.1
  • First release: Mar 6, 2019
  • Latest release: Jul 5, 2023
  • Number of updates: 28
  • Update frequency: every 56.5 days
  • Top authors: faktorvier (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

400+ active /5,587 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲5.01MB] [CPU: ▲24.33ms] 75% from 4 tests

Server-side resources used by F4 Post Tree
It is recommended to improve the following
  • Extra RAM: The extra memory usage must be under 5MB (currently 5.01MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.88 ▲5.4266.70 ▲29.31
Dashboard /wp-admin8.90 ▲5.5680.74 ▲25.40
Posts /wp-admin/edit.php8.90 ▲5.5577.79 ▲32.70
Add New Post /wp-admin/post-new.php9.39 ▲3.51105.25 ▲9.91
Media Library /wp-admin/upload.php8.90 ▲5.6767.44 ▲35.54
Post Tree /wp-admin/options-general.php?page=f4-tree-settings8.9064.01
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius8.9056.54

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 196 new files
Database: no new tables, 10 new options
New WordPress options
widget_theysaidso_widget
fs_accounts
f4-tree-changed-timestamp
widget_recent-comments
theysaidso_admin_options
fs_debug_mode
widget_recent-posts
can_compress_scripts
fs_active_plugins
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for F4 Post Tree
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲10213.55 ▼1.081.58 ▼0.0932.00 ▼5.80
Dashboard /wp-admin2,254 ▲655.88 ▲0.95106.81 ▼5.0441.89 ▲1.72
Posts /wp-admin/edit.php2,215 ▲1232.49 ▲0.4351.43 ▲15.7034.68 ▲2.72
Add New Post /wp-admin/post-new.php1,620 ▲8723.61 ▲0.36647.33 ▼36.5834.36 ▼19.37
Media Library /wp-admin/upload.php1,439 ▲514.25 ▲0.0593.23 ▼5.5247.51 ▲1.18
Post Tree /wp-admin/options-general.php?page=f4-tree-settings1,0031.7126.0268.27
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0771.6925.7623.66

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/f4-tree/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 10 options in the database
    • fs_accounts
    • db_upgraded
    • f4-tree-changed-timestamp
    • widget_recent-posts
    • widget_recent-comments
    • fs_debug_mode
    • theysaidso_admin_options
    • fs_active_plugins
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_types() in wp-content/plugins/f4-tree/Tree/views/admin-settings-fields.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'F4\\TREE\\Tree\\Helpers' not found in wp-content/plugins/f4-tree/Tree/views/tree.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/f4-tree/Core/views/admin-settings.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
8 plugin tags: drag-and-drop, posts, treeview, tree, sidebar...

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

The principal PHP file in "F4 Post Tree" v. 1.1.15 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Domain Path: The domain path should use only dashes and lowercase characters ("/languages*/")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected34,805 lines of code in 148 files:
LanguageFilesBlank linesComment linesLines of code
PHP1258,12517,51233,656
JavaScript611481504
CSS152964423
Markdown1680214
SVG1018

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please fix the following
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity87.23
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.55
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes52
▷ Abstract classes23.85%
▷ Concrete classes5096.15%
▷ Final classes00.00%
Methods1,294
▷ Static methods23217.93%
▷ Public methods90569.94%
▷ Protected methods171.31%
▷ Private methods37228.75%
Functions103
▷ Named functions9996.12%
▷ Anonymous functions43.88%
Constants155
▷ Global constants10869.68%
▷ Class constants4730.32%
▷ Public constants47100.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
4 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/made-with-love-by-f4.png1.83KB1.95KB0.00%
freemius/assets/img/plugin-icon.png32.53KB15.44KB▼ 52.52%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
Tree/assets/img/tree-icon-menu.png0.94KB0.10KB▼ 88.85%