83% colorbox-panels

Code Review | Colorbox Panels & Info Box

WordPress plugin Colorbox Panels & Info Box scored83%from 54 tests.

About plugin

  • Plugin page: colorbox-panels
  • Plugin version: 2.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Feb 3, 2016
  • Latest release: Oct 10, 2023
  • Number of updates: 51
  • Update frequency: every 55.0 days
  • Top authors: wpshopmart (100%)

Code review

54 tests

User reviews

44 reviews

Install metrics

1,000+ active /68,759 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼3.21ms] 75% from 4 tests

This is a short check of server-side resources used by Colorbox Panels & Info Box
Please take the time to fix the following items
  • CPU: Total CPU usage must kept under 500.00ms (currently 501.70ms on /wp-admin/edit.php?post_type=colorbox_panels&page=wpsm_ac_sh_help_page)
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1337.57 ▼3.18
Dashboard /wp-admin3.47 ▲0.1648.70 ▼2.91
Posts /wp-admin/edit.php3.57 ▲0.2248.34 ▲1.17
Add New Post /wp-admin/post-new.php6.05 ▲0.1788.64 ▼7.93
Media Library /wp-admin/upload.php3.40 ▲0.1739.83 ▲6.58
Add New Colorbox /wp-admin/post-new.php?post_type=colorbox_panels3.6152.47
More Free Plugins /wp-admin/edit.php?post_type=colorbox_panels&page=wpsm_ac_sh_help_page3.46501.70
All Colorbox /wp-admin/edit.php?post_type=colorbox_panels3.4437.00

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Colorbox Panels & Info Box
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲15713.58 ▼0.819.12 ▲7.5840.14 ▼2.01
Dashboard /wp-admin2,238 ▲605.59 ▼0.1382.09 ▼17.8537.45 ▼3.34
Posts /wp-admin/edit.php2,140 ▲401.99 ▼0.0335.03 ▼1.1432.84 ▼3.04
Add New Post /wp-admin/post-new.php1,561 ▲3523.39 ▲0.26665.90 ▲2.7567.21 ▲15.16
Media Library /wp-admin/upload.php1,440 ▲374.24 ▲0.03105.11 ▲11.2646.96 ▲3.34
Add New Colorbox /wp-admin/post-new.php?post_type=colorbox_panels6,1847.22345.55181.60
More Free Plugins /wp-admin/edit.php?post_type=colorbox_panels&page=wpsm_ac_sh_help_page1,7111.7028.2632.77
All Colorbox /wp-admin/edit.php?post_type=colorbox_panels1,1121.9230.4829.16

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • wpsm_colorbox_p_review
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 12× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/colorbox-panels/ink/admin/add-colorbox.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/colorbox-panels/template/content.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/colorbox-panels/ink/admin/help.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/colorbox-panels/template/style.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/colorbox-panels/ink/install/installation.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/colorbox-panels/ink/admin/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _x() in wp-content/plugins/colorbox-panels/ink/admin/cpt-reg.php:3
    • > PHP Notice
      Undefined variable: WPSM_Colorbox_ID in wp-content/plugins/colorbox-panels/template/content.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/colorbox-panels/colobox-panels.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/colorbox-panels/template/shortcode.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 47 tag instead of maximum 10
  • Screenshots: A description for screenshot #3 is missing in colorbox-panels/assets to your readme.txt
You can look at the official readme.txt

colorbox-panels/colobox-panels.php 85% from 13 tests

"Colorbox Panels & Info Box" version 2.1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 153 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("colorbox-panels.php" instead of "colobox-panels.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin24,892 lines of code in 68 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript122,0531,53212,685
CSS166522157,304
PHP13209782,092
Sass1319221,158
LESS1319311,149
SVG100504

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.31
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods16.25%
▷ Public methods1593.75%
▷ Protected methods00.00%
▷ Private methods16.25%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
37 PNG files occupy 1.50MB with 0.73MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/ui-bg_glass_75_d0e5f5_1x400.png0.33KB0.16KB▼ 52.38%
assets/css/images/ui-bg_flat_0_aaaaaa_40x100.png0.21KB0.08KB▼ 58.96%
assets/tooltip/img/shadow.png86.29KB34.10KB▼ 60.48%
assets/css/images/ui-icons_2e83ff_256x240.png4.44KB4.17KB▼ 6.02%
assets/css/images/button_check.png4.66KB1.57KB▼ 66.23%