78% notifications-bearychat

Code Review | Notifications For BearyChat

WordPress plugin Notifications For BearyChat scored78%from 54 tests.

About plugin

  • Plugin page: notifications-bea...
  • Plugin version: 0.1
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-4.9.8
  • WordPress version: 6.3.1
  • First release: Nov 5, 2018
  • Latest release: Nov 6, 2018
  • Number of updates: 9
  • Update frequency: every 0.1 days
  • Top authors: bestony (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /481 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
Installer ran successfully

Server metrics [RAM: ▼0.66MB] [CPU: ▼18.11ms] Passed 4 tests

An overview of server-side resources used by Notifications For BearyChat
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0244.33 ▲2.30
Dashboard /wp-admin3.34 ▲0.0449.40 ▼7.07
Posts /wp-admin/edit.php3.40 ▲0.0452.13 ▲0.06
Add New Post /wp-admin/post-new.php3.13 ▼2.7637.89 ▼66.24
Media Library /wp-admin/upload.php3.27 ▲0.0436.06 ▲0.80
Bearychat Notification /wp-admin/options-general.php?page=bearychat_notification3.2630.19

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Notifications For BearyChat
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.23 ▼0.301.81 ▲0.0742.75 ▲0.28
Dashboard /wp-admin2,199 ▲255.63 ▲0.1091.80 ▼5.9738.30 ▼8.93
Posts /wp-admin/edit.php2,104 ▲11.99 ▼0.0441.87 ▲3.0635.69 ▼0.37
Add New Post /wp-admin/post-new.php1,529 ▼722.93 ▲4.63572.79 ▼51.2967.76 ▲4.77
Media Library /wp-admin/upload.php1,404 ▲14.20 ▲0.0698.66 ▲0.1545.70 ▲1.00
Bearychat Notification /wp-admin/options-general.php?page=bearychat_notification1,0222.0023.4146.89

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 27 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=bearychat_notification
    • > Notice in wp-content/plugins/notifications-bearychat/admin/woo-handle.php+76
    Trying to access array offset on value of type bool

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
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/notifications-bearychat/events/comment.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/notifications-bearychat/events/system.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/notifications-bearychat/events/user.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/notifications-bearychat/events/woocommerce.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/notifications-bearychat/events/post.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/notifications-bearychat/events/page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/notifications-bearychat/admin/init.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/notifications-bearychat/admin/init.php:11

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

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
1 plugin tags: notification

notifications-bearychat/bearychat-notification.php 85% from 13 tests

The entry point to "Notifications For BearyChat" version 0.1 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("notifications-bearychat.php" instead of "bearychat-notification.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin1,365 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP16133711,026
PO File199106231
Markdown3390108

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions55
▷ Named functions55100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected