84% demo-bar

Code Review | Demo Bar- Best Tool To Showcase Website Demos With Styles

WordPress plugin Demo Bar- Best Tool To Showcase Website Demos With Styles scored84%from 54 tests.

About plugin

  • Plugin page: demo-bar
  • Plugin version: 1.0.6
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3
  • WordPress version: 6.3.1
  • First release: Jan 3, 2016
  • Latest release: Sep 7, 2023
  • Number of updates: 37
  • Update frequency: every 75.9 days
  • Top authors: WEN Solutions (86.49%)wptravel (16.22%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /11,259 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼9.49ms] Passed 4 tests

Analyzing server-side resources used by Demo Bar- Best Tool To Showcase Website Demos With Styles
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0439.89 ▼4.26
Dashboard /wp-admin3.37 ▲0.0748.85 ▼3.32
Posts /wp-admin/edit.php3.49 ▲0.1351.33 ▼1.56
Add New Post /wp-admin/post-new.php5.95 ▲0.0786.73 ▼28.80
Media Library /wp-admin/upload.php3.29 ▲0.0642.26 ▲8.43
Add Site /wp-admin/post-new.php?post_type=dbsite3.3347.01
Settings /wp-admin/edit.php?post_type=dbsite&page=demo-bar3.3341.73
Sites /wp-admin/edit.php?post_type=dbsite3.3440.86

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 32 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
demobar_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Demo Bar- Best Tool To Showcase Website Demos With Styles
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲7214.72 ▲0.161.88 ▼0.1340.39 ▼6.59
Dashboard /wp-admin2,231 ▲515.56 ▼0.0384.90 ▼12.4038.88 ▼4.86
Posts /wp-admin/edit.php2,136 ▲332.01 ▲0.0536.90 ▼3.6337.93 ▲2.75
Add New Post /wp-admin/post-new.php1,567 ▲3923.27 ▲0.16700.04 ▲57.9563.61 ▲13.66
Media Library /wp-admin/upload.php1,436 ▲364.14 ▲0.08113.30 ▼0.0749.32 ▲3.75
Add Site /wp-admin/post-new.php?post_type=dbsite1,5112.6256.7035.18
Settings /wp-admin/edit.php?post_type=dbsite&page=demo-bar1,3213.9265.5227.10
Sites /wp-admin/edit.php?post_type=dbsite1,1161.9930.4930.90

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • 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
Everything seems fine, however this is by no means 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 take a closer look at the following
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      require_once(): Failed opening required '/tmp/wordpress-tests-lib/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/demo-bar/tests/bootstrap.php on line 12
    • > PHP Warning
      require_once(/tmp/wordpress-tests-lib/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/demo-bar/tests/bootstrap.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/demo-bar/templates/switcher.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/demo-bar/tests/test-post-types.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/demo-bar/templates/admin/admin-sidebar.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: demo, bar

demo-bar/demo-bar.php 85% from 13 tests

The main PHP file in "Demo Bar- Best Tool To Showcase Website Demos With Styles" ver. 1.0.6 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Domain Path: The domain path must begin with a forward slash character ("/languages")
  • Domain Path: Use only dashes and lowercase characters for the domain path ("languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected3,731 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
CSS34182,224
PHP16139478763
SVG100655
JavaScript223989

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity7.67
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity2.22
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods49
▷ Static methods1428.57%
▷ Public methods4591.84%
▷ Protected methods00.00%
▷ Private methods48.16%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
1 compressed PNG file occupies 0.01MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/bg.png5.28KB5.17KB▼ 2.13%