77% aimtell-web-push-notifications

Code Review | Web Push Notifications by Aimtell

WordPress plugin Web Push Notifications by Aimtell scored77%from 54 tests.

About plugin

  • Plugin page: aimtell-web-push-...
  • Plugin version: 1.63
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 8, 2016
  • Latest release: Jan 13, 2023
  • Number of updates: 52
  • Update frequency: every 49.3 days
  • Top authors: aimtell (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /6,315 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

Server-side resources used by Web Push Notifications by Aimtell
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.56 ▼1.27
Dashboard /wp-admin3.31 ▲0.0147.68 ▲0.65
Posts /wp-admin/edit.php3.36 ▲0.0145.89 ▲3.14
Add New Post /wp-admin/post-new.php5.89 ▲0.0180.63 ▼20.40
Media Library /wp-admin/upload.php3.23 ▲0.0132.73 ▼0.78

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Web Push Notifications by Aimtell
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲8814.45 ▲0.231.92 ▲0.2146.20 ▲4.71
Dashboard /wp-admin2,215 ▲294.93 ▲0.0097.10 ▼12.7667.52 ▲24.01
Posts /wp-admin/edit.php2,095 ▲62.01 ▼0.0333.82 ▼2.7630.97 ▲2.19
Add New Post /wp-admin/post-new.php1,524 ▼923.28 ▲0.10687.92 ▼14.0453.01 ▼1.65
Media Library /wp-admin/upload.php1,394 ▲34.21 ▼0.0199.36 ▼10.2670.93 ▲24.90

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
  • 5× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/aimtell-web-push-notifications/templates/login.php
    • > /wp-content/plugins/aimtell-web-push-notifications/assets/js/aimtell-worker.js.php
    • > /wp-content/plugins/aimtell-web-push-notifications/templates/addSite.php
    • > /wp-content/plugins/aimtell-web-push-notifications/templates/register.php
    • > /wp-content/plugins/aimtell-web-push-notifications/templates/viewSite.php
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant AIMTELL_URL - assumed 'AIMTELL_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/aimtell-web-push-notifications/templates/addSite.php on line 4
    • > PHP Notice
      Undefined variable: aimtell_auth_token in wp-content/plugins/aimtell-web-push-notifications/templates/viewSite.php on line 20
    • > PHP Warning
      Use of undefined constant AIMTELL_URL - assumed 'AIMTELL_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/aimtell-web-push-notifications/templates/addSite.php on line 12
    • > PHP Warning
      Use of undefined constant AIMTELL_URL - assumed 'AIMTELL_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/aimtell-web-push-notifications/templates/register.php on line 4
    • > PHP Warning
      Use of undefined constant AIMTELL_URL - assumed 'AIMTELL_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/aimtell-web-push-notifications/templates/login.php on line 4
    • > PHP Notice
      Undefined variable: aimtell_auth_token in wp-content/plugins/aimtell-web-push-notifications/templates/viewSite.php on line 12
    • > PHP Warning
      Use of undefined constant AIMTELL_CURSITE_URL - assumed 'AIMTELL_CURSITE_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/aimtell-web-push-notifications/templates/addSite.php on line 21
    • > PHP Warning
      Use of undefined constant AIMTELL_URL - assumed 'AIMTELL_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/aimtell-web-push-notifications/templates/addSite.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/aimtell-web-push-notifications/aimtell.php:24

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots need descriptions #6, #6 in aimtell-web-push-notifications/assets to your readme.txt
  • Tags: Please reduce the number of tags, currently 17 tag instead of maximum 10
The official readme.txt is a good inspiration

aimtell-web-push-notifications/aimtell.php 85% from 13 tests

The primary PHP file in "Web Push Notifications by Aimtell" version 1.63 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("aimtell-web-push-notifications.php" instead of "aimtell.php")
  • Description: The description should be shorter than 140 characters (currently 269 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin1,261 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP614583850
JavaScript16266239
CSS14310169
JSON1003

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.49
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.08MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png26.18KB4.43KB▼ 83.07%
assets/images/logo_white.png28.32KB3.44KB▼ 87.85%
assets/images/select2.png0.60KB0.99KB0.00%
assets/images/aimtell_icon.png20.83KB0.57KB▼ 97.25%
assets/images/droparrows.png1.08KB0.24KB▼ 78.20%