84% notification-system

Code Review | Notification system

WordPress plugin Notification system scored84%from 54 tests.

About plugin

  • Plugin page: notification-system
  • Plugin version: 1.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.0
  • WordPress version: 6.3.1
  • First release: Mar 2, 2019
  • Latest release: Jun 13, 2022
  • Number of updates: 8
  • Update frequency: every 150.5 days
  • Top authors: kaggdesign (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,488 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.70ms] Passed 4 tests

An overview of server-side resources used by Notification system
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0841.41 ▲0.33
Dashboard /wp-admin3.37 ▲0.0252.76 ▼13.92
Posts /wp-admin/edit.php3.42 ▲0.0748.09 ▼9.90
Add New Post /wp-admin/post-new.php5.97 ▲0.0998.01 ▼12.54
Media Library /wp-admin/upload.php3.29 ▲0.0637.39 ▼2.43
Add New /wp-admin/post-new.php?post_type=notification3.5058.02
Notifications /wp-admin/edit.php?post_type=notification3.3444.05
Channels /wp-admin/edit-tags.php?taxonomy=channel&post_type=notification3.3841.48

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

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

Browser metrics Passed 4 tests

Notification system: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,989 ▲24314.90 ▲0.2928.67 ▲26.7549.21 ▲2.36
Dashboard /wp-admin2,240 ▲635.59 ▼0.07113.56 ▲5.1553.18 ▲7.86
Posts /wp-admin/edit.php2,152 ▲492.05 ▲0.0642.66 ▼1.0837.95 ▼0.27
Add New Post /wp-admin/post-new.php1,554 ▲2621.23 ▼1.52689.46 ▲4.7740.99 ▼13.28
Media Library /wp-admin/upload.php1,445 ▲484.14 ▼0.22118.08 ▲2.6450.94 ▼0.36
Add New /wp-admin/post-new.php?post_type=notification2,2837.68206.8569.37
Notifications /wp-admin/edit.php?post_type=notification1,1161.9642.0430.68
Channels /wp-admin/edit-tags.php?taxonomy=channel&post_type=notification1,2942.1433.8432.66

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/notification-system/classes/class-notifications-api-controller.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: notification channel, notification, user notification, notification system

notification-system/notification-system.php Passed 13 tests

The principal PHP file in "Notification system" v. 1.3 is loaded by WordPress automatically on each request
70 characters long description:
Creates and maintains notification system for users on WordPress site.

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 detected2,535 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP184581,1772,025
CSS2505260
PO File15467132
YAML3180100
JSON20010
SVG3007
JavaScript1011

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity18.33
▷ Minimum class complexity1.00
▷ Maximum class complexity56.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods133
▷ Static methods3123.31%
▷ Public methods9974.44%
▷ Protected methods1712.78%
▷ Private methods1712.78%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants13
▷ Global constants538.46%
▷ Class constants861.54%
▷ Public constants8100.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