74% cbxwpbookmark

Code Review | CBX Bookmark & Favorite

WordPress plugin CBX Bookmark & Favorite scored74%from 54 tests.

About plugin

  • Plugin page: cbxwpbookmark
  • Plugin version: 1.7.17
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.4.1
  • WordPress version: 6.3.1
  • First release: Dec 13, 2015
  • Latest release: Nov 16, 2023
  • Number of updates: 123
  • Update frequency: every 23.5 days
  • Top authors: manchumahara (100%)

Code review

54 tests

User reviews

40 reviews

Install metrics

1,000+ active /44,473 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲1.56MB] [CPU: ▲4.15ms] 75% from 4 tests

This is a short check of server-side resources used by CBX Bookmark & Favorite
Please have a look at the following items
  • CPU: The total CPU usage must kept under 500.00ms (currently 1,753.88ms on /wp-admin/admin.php?page=cbxwpbookmarkdash)
PageMemory (MB)CPU Time (ms)
Home /4.97 ▲1.5148.32 ▲6.44
Dashboard /wp-admin4.87 ▲1.5654.82 ▲4.31
Posts /wp-admin/edit.php4.99 ▲1.6360.22 ▲10.39
Add New Post /wp-admin/post-new.php7.47 ▲1.5891.09 ▼4.54
Media Library /wp-admin/upload.php4.80 ▲1.5749.26 ▲19.05
User Bookmarks /wp-admin/admin.php?page=cbxwpbookmark4.7947.37
Bookmarks Dashboard /wp-admin/admin.php?page=cbxwpbookmarkdash6.031,753.88
Bookmark Categories /wp-admin/admin.php?page=cbxwpbookmarkcats4.7945.05
Setting /wp-admin/admin.php?page=cbxwpbookmark_settings4.8246.48

Server storage [IO: ▲2.90MB] [DB: ▲0.09MB] Passed 3 tests

Filesystem and database footprint
The plugin installed successfully
Filesystem: 360 new files
Database: 2 new tables, 12 new options
New tables
wp_cbxwpbookmark
wp_cbxwpbookmarkcat
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_cbxwpbookmarkedmost-widget
db_upgraded
cbxwpbookmark_basics
cbxwpbookmark_tools
widget_recent-posts
widget_cbxwpbookmarkcategory
widget_recent-comments
widget_cbxwpbookmark-widget
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for CBX Bookmark & Favorite
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,988 ▲22613.55 ▼1.1611.60 ▲9.9529.35 ▼15.84
Dashboard /wp-admin2,226 ▲465.55 ▼0.1093.63 ▼6.9776.25 ▲29.58
Posts /wp-admin/edit.php2,134 ▲342.00 ▲0.0538.01 ▲0.2935.60 ▼1.45
Add New Post /wp-admin/post-new.php1,728 ▲20224.03 ▲0.74755.88 ▲82.1042.00 ▼18.61
Media Library /wp-admin/upload.php1,431 ▲284.13 ▼0.1895.27 ▼6.2974.68 ▲31.92
User Bookmarks /wp-admin/admin.php?page=cbxwpbookmark1,1672.0226.6642.62
Bookmarks Dashboard /wp-admin/admin.php?page=cbxwpbookmarkdash1,5782.0021.6655.32
Bookmark Categories /wp-admin/admin.php?page=cbxwpbookmarkcats1,1702.0525.8633.68
Setting /wp-admin/admin.php?page=cbxwpbookmark_settings2,2664.42102.2685.58

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_cbxwpbookmark
    • wp_cbxwpbookmarkcat
  • This plugin did not uninstall successfully, leaving 12 options in the database
    • widget_cbxwpbookmarkcategory
    • widget_cbxwpbookmarkedmost-widget
    • cbxwpbookmark_tools
    • db_upgraded
    • theysaidso_admin_options
    • widget_cbxwpbookmark-widget
    • widget_theysaidso_widget
    • widget_recent-comments
    • cbxwpbookmark_basics
    • cbxwpbookmark_customizer
    • ...

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/cbxwpbookmark/widgets/classic_widgets/category-widget/views/admin.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/cbxwpbookmark/widgets/classic_widgets/mybookmark-widget/views/admin.php:5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/cbxwpbookmark/widgets/classic_widgets/most-widget/views/admin.php:5

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add descriptions for these screenshots #1, #2, #3, #4, #5, #6, #7, #8, #9, #10, #11, #12, #13, #14, #15, #16, #17, #18 in cbxwpbookmark/assets to your readme.txt
The official readme.txt might help

cbxwpbookmark/cbxwpbookmark.php Passed 13 tests

The main PHP file in "CBX Bookmark & Favorite" ver. 1.7.17 adds more information about the plugin and also serves as the entry point for this plugin
121 characters long description:
List/category based bookmark for WordPress, create your own private or public list of favorite posts, page, custom object

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected35,732 lines of code in 310 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2053,6242,40215,773
PHP482,5942,9859,186
CSS144501226,017
Sass361,0071184,640
SVG706116

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity35.50
▷ Minimum class complexity1.00
▷ Maximum class complexity260.00
Average method complexity4.56
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes32
▷ Abstract classes00.00%
▷ Concrete classes32100.00%
▷ Final classes00.00%
Methods303
▷ Static methods6822.44%
▷ Public methods28895.05%
▷ Protected methods92.97%
▷ Private methods61.98%
Functions16
▷ Named functions1593.75%
▷ Anonymous functions16.25%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
33 compressed PNG files occupy 0.13MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/search_icon.png0.35KB0.41KB0.00%
assets/img/delete_icon.png0.39KB0.61KB0.00%
assets/img/close_icon_white.png0.23KB0.26KB0.00%
assets/img/delete_icon_white.png0.41KB0.61KB0.00%
assets/img/bookmarkicons/bookmark_before.png0.33KB0.34KB0.00%