68% ciusan-notification-bar

Code Review | Ciusan Notification Bar

WordPress plugin Ciusan Notification Bar scored68%from 54 tests.

About plugin

  • Plugin page: ciusan-notificati...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.1.1
  • WordPress version: 6.3.1
  • First release: Mar 3, 2015
  • Latest release: Mar 15, 2015
  • Number of updates: 11
  • Update frequency: every 1.1 days
  • Top authors: k0z3y (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,836 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.22MB] [CPU: ▼43.57ms] Passed 4 tests

An overview of server-side resources used by Ciusan Notification Bar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.75 ▼0.7114.55 ▼24.06
Dashboard /wp-admin2.79 ▼0.5216.43 ▼33.50
Posts /wp-admin/edit.php2.79 ▼0.5715.75 ▼31.81
Add New Post /wp-admin/post-new.php2.79 ▼3.1015.14 ▼84.89
Media Library /wp-admin/upload.php2.79 ▼0.4416.64 ▼23.04
Notification Bar /wp-admin/admin.php?page=ciusan-notification-bar2.7917.82
Submit a Donation /wp-admin/admin.php?page=ciusan-submit-donation2.7915.43

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Ciusan Notification Bar
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8413.68 ▼0.984.69 ▲3.1642.94 ▲1.46
Dashboard /wp-admin2,232 ▲445.83 ▲0.9697.87 ▼9.8779.15 ▲34.60
Posts /wp-admin/edit.php2,115 ▲262.05 ▼0.0637.41 ▲1.2833.27 ▼0.15
Add New Post /wp-admin/post-new.php1,543 ▲123.54 ▲5.09699.29 ▲62.2754.59 ▲10.48
Media Library /wp-admin/upload.php1,414 ▲234.16 ▼0.03109.05 ▲9.7979.03 ▲35.50
Notification Bar /wp-admin/admin.php?page=ciusan-notification-bar1,3705.55104.8055.62
Submit a Donation /wp-admin/admin.php?page=ciusan-submit-donation7671.6824.7023.86

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/ciusan-notification-bar/ciusan-notification-bar.php+55
    Use of undefined constant ciusan_admin__head - assumed 'ciusan_admin__head' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ciusan-submit-donation
    • > Warning in wp-content/plugins/ciusan-notification-bar/ciusan-notification-bar.php+55
    Use of undefined constant ciusan_admin__head - assumed 'ciusan_admin__head' (this will throw an Error in a future version of PHP)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ciusan-submit-donation
    • > User deprecated in wp-includes/functions.php+5453
    Function add_object_page is deprecated since version 4.5.0! Use add_menu_page() instead.
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ciusan-submit-donation
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/admin.php?page=ciusan-notification-bar
    • > Warning in wp-content/plugins/ciusan-notification-bar/admin_menu.php+15
    Use of undefined constant CNB_Showing - assumed 'CNB_Showing' (this will throw an Error in a future version of PHP)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ciusan-notification-bar
    • > Notice in wp-content/plugins/ciusan-notification-bar/admin_menu.php+70
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/admin.php?page=ciusan-notification-bar
    • > Warning in wp-content/plugins/ciusan-notification-bar/admin_menu.php+28
    Use of undefined constant CNB_FixedBar - assumed 'CNB_FixedBar' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=ciusan-notification-bar
    • > Warning in wp-content/plugins/ciusan-notification-bar/admin_menu.php+60
    Use of undefined constant CNB_Content - assumed 'CNB_Content' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=ciusan-notification-bar
    • > Warning in wp-content/plugins/ciusan-notification-bar/admin_menu.php+65
    Use of undefined constant CNB_BName - assumed 'CNB_BName' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=ciusan-notification-bar
    • > Warning in wp-content/plugins/ciusan-notification-bar/admin_menu.php+70
    Use of undefined constant CNB_BLink - assumed 'CNB_BLink' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=ciusan-submit-donation
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'ciusan_submit_donation' not found or invalid function name

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ciusan-notification-bar/ciusan-notification-bar.php:26

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
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (Ciusan Notification Bar on frontend site.), #2 (Hidden Ciusan Notification Bar on frontend site.), #3 (All settings on WP Dashboard.)
You can look at the official readme.txt

ciusan-notification-bar/ciusan-notification-bar.php Passed 13 tests

The entry point to "Ciusan Notification Bar" version 1.1 is a PHP file that has certain tags in its header comment area
40 characters long description:
Showing information or notes on top bar.

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
Good job! No executable or dangerous file extensions detected405 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
CSS296240
PHP3825152
JavaScript25013

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
6 PNG files occupy 0.17MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/ciusan.png22.87KB0.53KB▼ 97.67%
assets/img/show.png1.14KB0.36KB▼ 68.69%
screenshot-3.png113.59KB40.69KB▼ 64.18%
assets/img/close.png1.25KB0.34KB▼ 72.51%
screenshot-1.png18.57KB2.55KB▼ 86.25%