10% notifications-for-pushbear

Code Review | Notifications For Pushbear

WordPress plugin Notifications For Pushbear scored10%from 54 tests.

About plugin

  • Plugin page: notifications-for...
  • 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 8, 2018
  • Latest release: Nov 8, 2018
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: bestony (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /463 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/notifications-for-pushbear/notifications-for-pushbear.php+19
    The use statement with non-compound name 'Pushbear' has no effect

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.92ms] Passed 4 tests

Analyzing server-side resources used by Notifications For Pushbear
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0139.49 ▼2.62
Dashboard /wp-admin3.32 ▲0.0143.73 ▼8.19
Posts /wp-admin/edit.php3.37 ▲0.0146.62 ▼0.63
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.49 ▼8.25
Media Library /wp-admin/upload.php3.24 ▲0.0135.30 ▲0.11
Notifications For Pushbear /wp-admin/options-general.php?page=notifications_for_Pushbear3.1830.19

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Notifications For Pushbear
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9414.48 ▲0.121.82 ▼0.4640.92 ▼5.91
Dashboard /wp-admin2,207 ▲285.80 ▼0.0797.48 ▼4.5342.82 ▼1.01
Posts /wp-admin/edit.php2,090 ▲12.03 ▼0.1134.79 ▼2.4535.31 ▲0.97
Add New Post /wp-admin/post-new.php1,540 ▲1823.31 ▲0.17671.99 ▲39.2057.99 ▼0.39
Media Library /wp-admin/upload.php1,395 ▲104.21 ▲0.02103.04 ▲5.3745.75 ▼4.43
Notifications For Pushbear /wp-admin/options-general.php?page=notifications_for_Pushbear7952.0427.4935.87

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

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
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=notifications_for_Pushbear
    • > Notice in wp-content/plugins/notifications-for-pushbear/admin/init.php+63
    Trying to access array offset on value of type bool

SRP 50% 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
Almost there! Just fix the following items
  • 4× 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-for-pushbear/admin/init.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/notifications-for-pushbear/events/user.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/notifications-for-pushbear/admin/init.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/notifications-for-pushbear/events/user.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
1 plugin tags: notification

notifications-for-pushbear/notifications-for-pushbear.php Passed 13 tests

"Notifications For Pushbear" version 0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
37 characters long description:
A Notifications Plugin For Pushbear

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
There were no executable files found in this plugin185 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP64112129
PO File1141456

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.03
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.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
There are no PNG files in this plugin