78% highlight

Code Review | Highlight Sitewide Notice, Text, Button Menu

WordPress plugin Highlight Sitewide Notice, Text, Button Menu scored78%from 54 tests.

About plugin

  • Plugin page: highlight
  • Plugin version: 1.6.0
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3
  • WordPress version: 6.3.1
  • First release: Aug 25, 2020
  • Latest release: Oct 26, 2023
  • Number of updates: 26
  • Update frequency: every 44.5 days
  • Top authors: quantumcloud (61.54%)dna88 (42.31%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,691 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.44MB] [CPU: ▼115.72ms] Passed 4 tests

A check of server-side resources used by Highlight Sitewide Notice, Text, Button Menu
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3741.44 ▼1.62
Dashboard /wp-admin3.80 ▲0.3747.45 ▼449.81
Posts /wp-admin/edit.php3.91 ▲0.5547.69 ▼8.03
Add New Post /wp-admin/post-new.php6.39 ▲0.5188.10 ▼3.40
Media Library /wp-admin/upload.php3.72 ▲0.4941.90 ▲6.12
Support /wp-admin/admin.php?page=qcld-highlight-supports3.6936.07
Highlight Menu /wp-admin/admin.php?page=qcld-btn-menu-settings3.6936.54
Highlight Contents /wp-admin/admin.php?page=qcld-highlight3.6936.40
Highlight Notice /wp-admin/admin.php?page=qcld-notice-settings3.7442.24

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 158 new files
Database: no new tables, 24 new options
New WordPress options
qcld_wp_notifications_enable
widget_recent-posts
qcld_wp_notifications_bg_color
qcld_wp_notifications_text_align
db_upgraded
qcld_wp_notifications_banner_style
qcld_wp_notifications_close_icon
qcld_wp_notifications_action_button
qcld_wp_notifications_button_text_align
qcld_wp_notifications_btn_font_color
...

Browser metrics Passed 4 tests

A check of browser resources used by Highlight Sitewide Notice, Text, Button Menu
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,976 ▲24114.43 ▼0.195.64 ▲3.8628.55 ▼17.95
Dashboard /wp-admin2,291 ▲1205.58 ▼0.0097.11 ▲11.4040.28 ▼0.25
Posts /wp-admin/edit.php2,198 ▲982.67 ▲0.7138.71 ▲3.3737.01 ▲1.03
Add New Post /wp-admin/post-new.php1,613 ▲7723.53 ▲5.19701.20 ▲42.9138.45 ▼24.44
Media Library /wp-admin/upload.php1,490 ▲965.04 ▲0.79107.87 ▲6.1349.27 ▲6.87
Support /wp-admin/admin.php?page=qcld-highlight-supports1,6382.5138.3984.70
Highlight Menu /wp-admin/admin.php?page=qcld-btn-menu-settings1,5523.0361.7732.59
Highlight Contents /wp-admin/admin.php?page=qcld-highlight2,1063.4958.6937.82
Highlight Notice /wp-admin/admin.php?page=qcld-notice-settings2,1986.46141.1497.32

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 24 options in the database
    • qcld_wp_notifications_btn_font_color
    • qcld_wp_notifications_call_action_text
    • qcld_wp_notifications_banner_style
    • qcld_wp_notifications_set_cookie
    • qcld_wp_notifications_call_action_btn
    • qcld_wp_notifications_text_align
    • qcld_wp_notifications_call_action_link
    • qcld_wp_notifications_banner_sticky
    • qcld_wp_notifications_button_text_align
    • qcld_wp_notifications_action_button
    • ...

Smoke tests 50% 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 no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 6× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/highlight/inc/button-menu/qcld-button-menu.php
    • > /wp-content/plugins/highlight/inc/notice/qcld-project-notification.php
    • > /wp-content/plugins/highlight/qc-project-highlight-asset.php
    • > /wp-content/plugins/highlight/qc-project-highlight-shortcode.php
    • > /wp-content/plugins/highlight/qc-project-highlight-main.php
    • > /wp-content/plugins/highlight/qc-project-highlight-frameworks.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/highlight/qc-support-promo-page/class-qc-support-promo-page.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/highlight/qc-free-plugin-upgrade-notice.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: nav menu, notification bar, sitewide notice, menu shortcode, text highlight

highlight/qc-project-highlight-main.php 85% from 13 tests

The main PHP script in "Highlight Sitewide Notice, Text, Button Menu" version 1.6.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("highlight.php" instead of "qc-project-highlight-main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin51,730 lines of code in 60 files:
LanguageFilesBlank linesComment linesLines of code
CSS303,78820824,256
JavaScript133,2402,17514,121
SVG811211,657
PHP95951101,696

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
43 PNG files occupy 0.99MB with 0.43MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
qc-support-promo-page/images/logo (1).png9.74KB5.02KB▼ 48.48%
qc-support-promo-page/images/icon-pack/service-05.png2.20KB1.44KB▼ 34.37%
qc-support-promo-page/images/icon-pack/service-01.png2.46KB1.72KB▼ 30.01%
qc-support-promo-page/images/icon-pack/service-03.png2.06KB1.36KB▼ 34.03%
qc-support-promo-page/images/voice-widgets-for-wordPress.png57.47KB16.74KB▼ 70.87%