10% hierarchical-bookmark-system

Code Review | Hierarchical Bookmark System

WordPress plugin Hierarchical Bookmark System scored10%from 54 tests.

About plugin

  • Plugin page: hierarchical-book...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8.1
  • WordPress version: 6.3.1
  • First release: Feb 28, 2014
  • Latest release: Mar 5, 2014
  • Number of updates: 4
  • Update frequency: every 1.5 days
  • Top authors: damies.softs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,024 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/hierarchical-bookmark-system/lib/Minifier.php+236
    "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?

Server metrics [RAM: ▼1.82MB] [CPU: ▼57.94ms] Passed 4 tests

This is a short check of server-side resources used by Hierarchical Bookmark System
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.17 ▼1.295.31 ▼42.89
Dashboard /wp-admin2.19 ▼1.1510.58 ▼57.91
Posts /wp-admin/edit.php2.19 ▼1.169.52 ▼39.65
Add New Post /wp-admin/post-new.php2.19 ▼3.695.59 ▼91.32
Media Library /wp-admin/upload.php2.19 ▼1.035.59 ▼31.53
Categories /wp-admin/edit-tags.php?taxonomy=bookmark_categories&post_type=bookmarks2.205.81
Add /wp-admin/post-new.php?post_type=bookmarks2.206.49
Bookmarks /wp-admin/edit.php?post_type=bookmarks2.206.79
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=bookmarks2.206.57

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 35 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Hierarchical Bookmark System
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,858 ▲9714.38 ▲0.072.03 ▲0.0939.13 ▼4.63
Dashboard /wp-admin2,229 ▲615.64 ▼0.0891.41 ▼12.2642.58 ▼4.05
Posts /wp-admin/edit.php2,137 ▲402.00 ▼0.0442.62 ▲5.8634.94 ▼2.52
Add New Post /wp-admin/post-new.php1,571 ▲4023.40 ▲0.14648.67 ▼22.7455.47 ▼6.64
Media Library /wp-admin/upload.php1,431 ▲284.23 ▲0.01101.00 ▲0.0446.91 ▼0.08
Categories /wp-admin/edit-tags.php?taxonomy=bookmark_categories&post_type=bookmarks1,3112.1427.3732.80
Add /wp-admin/post-new.php?post_type=bookmarks2,4777.73192.6370.28
Bookmarks /wp-admin/edit.php?post_type=bookmarks1,1171.9534.1031.45
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=bookmarks1,3532.1728.5631.73

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/hierarchical-bookmark-system/lib/Minifier.php+236
    "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=bookmarks
    • > Warning in wp-content/plugins/hierarchical-bookmark-system/lib/Minifier.php+236
    "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?

SRP 0% 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 take a closer look at the following
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/hierarchical-bookmark-system/templates/post-new.php
    • > /wp-content/plugins/hierarchical-bookmark-system/templates/post-success.php
    • > /wp-content/plugins/hierarchical-bookmark-system/templates/single-bookmark.php
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_term() in wp-content/plugins/hierarchical-bookmark-system/templates/category-edit.php:5
    • > PHP Notice
      Undefined index: post in wp-content/plugins/hierarchical-bookmark-system/templates/post-edit.php on line 3
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/hierarchical-bookmark-system/lib/Minifier.php on line 236
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/hierarchical-bookmark-system/d-bookmarks.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_terms() in wp-content/plugins/hierarchical-bookmark-system/templates/post-edit.php:4
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/hierarchical-bookmark-system/lib/Minifier.php on line 236
    • > PHP Notice
      Undefined index: category in wp-content/plugins/hierarchical-bookmark-system/templates/category-edit.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: bookmarklet, firefox bookmark, bookmarks, chrome bookmark, post-type

hierarchical-bookmark-system/d-bookmarks.php 92% from 13 tests

"Hierarchical Bookmark System" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("hierarchical-bookmark-system.php" instead of "d-bookmarks.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin3,036 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
CSS61741181,793
PHP82612741,013
JavaScript42638144
PO File1363686

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity35.67
▷ Minimum class complexity26.00
▷ Maximum class complexity51.00
Average method complexity3.81
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods37
▷ Static methods513.51%
▷ Public methods1848.65%
▷ Protected methods821.62%
▷ Private methods1129.73%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
10 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/close-circled.png0.31KB0.44KB0.00%
templates/css/pencil_edit.png3.13KB0.42KB▼ 86.53%
templates/css/delete.png0.34KB0.44KB0.00%
css/browser_window.png0.14KB0.12KB▼ 14.08%
templates/css/arrow-up.png0.21KB0.30KB0.00%