10% treeview-on-contents

Code Review | Treeview On Contents

WordPress plugin Treeview On Contents scored10%from 54 tests.

About plugin

  • Plugin page: treeview-on-contents
  • Plugin version: 0.1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.1
  • WordPress version: 6.3.1
  • First release: Mar 18, 2013
  • Latest release: Jan 12, 2015
  • Number of updates: 37
  • Update frequency: every 18.0 days
  • Top authors: sekishi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /3,536 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/treeview-on-contents/treeview-on-contents.php+33
    Methods with the same name as their class will not be constructors in a future version of PHP; TreeViewOnContents has a deprecated constructor

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

Server-side resources used by Treeview On Contents
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.22 ▼7.01
Dashboard /wp-admin3.32 ▲0.0147.44 ▲1.18
Posts /wp-admin/edit.php3.37 ▲0.0147.92 ▲2.01
Add New Post /wp-admin/post-new.php5.90 ▲0.0194.82 ▼0.12
Media Library /wp-admin/upload.php3.24 ▲0.0133.87 ▼0.74
TreeView On Contents /wp-admin/options-general.php?page=tvonc_settings3.1839.57

Server storage [IO: ▲0.21MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 43 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
use_easy_block_selector
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Treeview On Contents
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,896 ▲16113.68 ▼0.605.17 ▲3.2642.75 ▼5.72
Dashboard /wp-admin2,212 ▲214.84 ▼0.02107.28 ▲4.5640.32 ▲1.53
Posts /wp-admin/edit.php2,095 ▲61.96 ▼0.0840.91 ▲0.9236.20 ▼0.14
Add New Post /wp-admin/post-new.php1,540 ▲2622.88 ▲5.42637.97 ▼1.4158.48 ▼7.60
Media Library /wp-admin/upload.php1,394 ▲64.13 ▼0.0994.24 ▼11.4241.21 ▼4.26
TreeView On Contents /wp-admin/options-general.php?page=tvonc_settings8002.0326.7126.02

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • use_easy_block_selector
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=tvonc_settings
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=tvonc_settings
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/treeview-on-contents/tinymce3/dialog.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/treeview-on-contents/treeview-on-contents.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 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
5 plugin tags: tinymce, contents, tree, view, editor

treeview-on-contents/treeview-on-contents.php Passed 13 tests

This is the main PHP file of "Treeview On Contents" version 0.1.8, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
21 characters long description:
TreeView On Contents.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected1,835 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript72342191,414
PHP25715221
CSS2306134
PO File1242766

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.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
7 PNG files occupy 0.11MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
tinymce3/tvonc_mce_icon.png2.94KB0.17KB▼ 94.39%
tinymce3/cross.png0.64KB0.72KB0.00%
tinymce3/change.png0.22KB0.17KB▼ 23.04%
screenshot-1.png22.31KB12.53KB▼ 43.85%
screenshot-3.png56.62KB24.15KB▼ 57.35%