72% eonet-live-notifications

Code Review | Eonet Live Notifications

WordPress plugin Eonet Live Notifications scored72%from 54 tests.

About plugin

  • Plugin page: eonet-live-notifi...
  • Plugin version: 1.0.11
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.0.3
  • WordPress version: 6.3.1
  • First release: Nov 9, 2016
  • Latest release: Feb 2, 2019
  • Number of updates: 26
  • Update frequency: every 31.2 days
  • Top authors: alkaweb (92.31%)antonioeatgoat (11.54%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active /44,092 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.10MB] [CPU: ▼9.76ms] Passed 4 tests

A check of server-side resources used by Eonet Live Notifications
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1137.99 ▼6.14
Dashboard /wp-admin3.43 ▲0.0844.60 ▼19.47
Posts /wp-admin/edit.php3.48 ▲0.1244.29 ▼3.84
Add New Post /wp-admin/post-new.php5.96 ▲0.0898.26 ▼9.58
Media Library /wp-admin/upload.php3.35 ▲0.1240.82 ▲6.62
Live Notifications /wp-admin/admin.php?page=?page=eonet&eo_settings=live-notifications3.1223.72
Eonet /wp-admin/admin.php?page=eonet3.3633.35

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Eonet Live Notifications
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,959 ▲21314.31 ▲0.097.77 ▲5.9832.78 ▼9.90
Dashboard /wp-admin2,235 ▲475.46 ▲0.59105.28 ▲4.6790.65 ▲45.66
Posts /wp-admin/edit.php2,136 ▲472.41 ▲0.3737.88 ▼3.4846.96 ▲12.33
Add New Post /wp-admin/post-new.php1,708 ▲18823.30 ▼0.02806.74 ▲181.8635.41 ▼19.88
Media Library /wp-admin/upload.php1,426 ▲414.84 ▲0.72100.82 ▼12.4384.76 ▲40.60
Live Notifications /wp-admin/admin.php?page=?page=eonet&eo_settings=live-notifications280.440.073.89
Eonet /wp-admin/admin.php?page=eonet1,1162.0831.2775.78

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

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | 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
  • 15× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/eonet-live-notifications/core/bootstrap.php
    • > /wp-content/plugins/eonet-live-notifications/core/helpers.php
    • > /wp-content/plugins/eonet-live-notifications/core/admin/pages/EonetPageSupport.php
    • > /wp-content/plugins/eonet-live-notifications/core/admin/EonetAdminPages.php
    • > /wp-content/plugins/eonet-live-notifications/init.php
    • > /wp-content/plugins/eonet-live-notifications/core/admin/pages/EonetPageSettings.php
    • > /wp-content/plugins/eonet-live-notifications/core/EonetGoogleFontLoader.php
    • > /wp-content/plugins/eonet-live-notifications/core/admin/pages/EonetPageExtensions.php
    • > /wp-content/plugins/eonet-live-notifications/core/EonetComponents.php
    • > /wp-content/plugins/eonet-live-notifications/core/EonetMetaboxes.php
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Eonet\\Core\\EonetComponents' not found in wp-content/plugins/eonet-live-notifications/core/admin/pages/views/extensions.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Eonet\\Core\\Admin\\EonetAdmin' not found in wp-content/plugins/eonet-live-notifications/core/admin/pages/views/themes.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Eonet\\Core\\EonetComponents' not found in wp-content/plugins/eonet-live-notifications/core/admin/views/wrapper.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/eonet-live-notifications/core/admin/pages/views/support.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'Eonet\\Core\\EonetComponents' not found in wp-content/plugins/eonet-live-notifications/core/admin/pages/views/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'ComponentLiveNotifications\\EonetLiveNotifications' not found in wp-content/plugins/eonet-live-notifications/component-live-notifications/settings.php:21

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=?page=eonet&eo_settings=live-notifications
    • > Network (severe)
    wp-admin/admin.php?page=?page=eonet&eo_settings=live-notifications - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: activity, buddypress, notifications, real time, groups...

eonet-live-notifications/init.php 92% from 13 tests

The main PHP script in "Eonet Live Notifications" version 1.0.11 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("eonet-live-notifications.php" instead of "init.php")

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
Everything looks great! No dangerous files found in this plugin23,405 lines of code in 52 files:
LanguageFilesBlank linesComment linesLines of code
PHP2468490911,367
SVG5039,167
Sass144271,771
JavaScript6194176618
PO File1192232480
CSS20632

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity19.92
▷ Minimum class complexity1.00
▷ Maximum class complexity128.00
Average method complexity3.56
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes13
▷ Abstract classes17.69%
▷ Concrete classes1292.31%
▷ Final classes00.00%
Methods100
▷ Static methods4242.00%
▷ Public methods7777.00%
▷ Protected methods2121.00%
▷ Private methods22.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
12 PNG files occupy 0.53MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
core/assets/images/colorpicker/hue.png0.49KB0.50KB0.00%
core/assets/images/logo.png10.69KB6.80KB▼ 36.38%
core/assets/images/themes/woffice.png446.42KB194.26KB▼ 56.48%
core/assets/images/colorpicker/alpha-horizontal.png0.54KB1.62KB0.00%
core/assets/images/logo_colored.png10.13KB6.09KB▼ 39.85%