88% adwised

Code Review | Adwised Web Push Notification

WordPress plugin Adwised Web Push Notification scored 88% from 54 tests.

About plugin

  • Plugin page: adwised
  • Plugin version: 2.4.8
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-5.3
  • WordPress version: 5.8.1
  • First release: Feb 19, 2020
  • Latest release: Sep 8, 2021
  • Number of updates: 66
  • Update frequency: every 8.6 days
  • Top authors: adwised (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 2,600 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼0.34MB] [CPU: ▼164.74ms] Passed 4 tests

An overview of server-side resources used by Adwised Web Push Notification
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.10 ▲0.3834.91 ▲12.71
Dashboard /wp-admin3.34 ▲0.2735.59 ▼8.51
Posts /wp-admin/edit.php3.45 ▲0.3437.25 ▼0.81
Add New Post /wp-admin/post-new.php3.19 ▼2.2620.43 ▼649.42
Media Library /wp-admin/upload.php3.28 ▲0.2826.69 ▼0.20

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 16 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Adwised Web Push Notification
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,709 ▲10815.73 ▲0.117.52 ▲2.4075.28 ▼0.43
Dashboard /wp-admin2,968 ▲696.09 ▼0.08113.43 ▼19.41195.83 ▲21.19
Posts /wp-admin/edit.php2,781 ▲413.15 ▼0.0767.29 ▲2.97145.33 ▲3.33
Add New Post /wp-admin/post-new.php2,130 ▼1,67720.84 ▲0.29411.82 ▼29.86159.87 ▼6.72
Media Library /wp-admin/upload.php1,785 ▲335.59 ▲0.06125.02 ▼13.81219.45 ▲35.08

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% 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 perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/adwised/views/sidebar.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/adwised/adwised.php:32
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/adwised/views/dashboard-notices.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/adwised/views/settings.php:78

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected


Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: notification, push, engagement, push notifications, web push...

adwised/adwised.php 85% from 13 tests

Analyzing the main PHP file in "Adwised Web Push Notification" version 2.4.8
Please make the necessary changes and fix the following:
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin2,336 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions2195.45%
▷ Anonymous functions14.55%
▷ Global constants00.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.12MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.PNG52.34KB22.00KB▼ 57.97%
assets/icon.png41.56KB17.19KB▼ 58.65%
assets/adwisedicon.png1.15KB0.95KB▼ 17.42%
adwisedicon.png1.15KB0.95KB▼ 17.42%
assets/screenshot-1.PNG23.66KB9.68KB▼ 59.10%