78% adwised

Code Review | Adwised Web Push Notification

WordPress plugin Adwised Web Push Notification scored78%from 54 tests.

About plugin

  • Plugin page: adwised
  • Plugin version: 2.5.7
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-5.3
  • WordPress version: 6.3.1
  • First release: Feb 19, 2020
  • Latest release: Apr 26, 2022
  • Number of updates: 69
  • Update frequency: every 11.6 days
  • Top authors: adwised (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /3,827 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.65MB] [CPU: ▼19.03ms] Passed 4 tests

Analyzing 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.50 ▲0.0339.22 ▼5.65
Dashboard /wp-admin3.35 ▲0.0455.27 ▲0.09
Posts /wp-admin/edit.php3.40 ▲0.0448.26 ▼6.20
Add New Post /wp-admin/post-new.php3.16 ▼2.7339.54 ▼64.34
Media Library /wp-admin/upload.php3.27 ▲0.0442.18 ▲3.61

Server storage [IO: ▲0.22MB] [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: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Adwised Web Push Notification
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,847 ▲6113.21 ▼1.591.58 ▼0.6647.05 ▲3.47
Dashboard /wp-admin2,253 ▲504.91 ▼0.94120.15 ▼2.47103.45 ▲52.35
Posts /wp-admin/edit.php2,135 ▲562.05 ▼0.0037.36 ▼1.6043.00 ▲7.71
Add New Post /wp-admin/post-new.php1,558 ▲3223.06 ▼0.42766.45 ▲77.1569.45 ▲7.03
Media Library /wp-admin/upload.php1,423 ▲264.26 ▲0.03107.76 ▲7.2195.52 ▲53.44

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_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/adwised/views/sidebar.php
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > 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: 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/settings.php:78

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: web push, notification, firebase, push, push notifications...

adwised/adwised.php 85% from 13 tests

The principal PHP file in "Adwised Web Push Notification" v. 2.5.7 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Domain Path: The domain path should be prefixed with a forward slash character ("/languages")
  • Domain Path: The domain path should use only dashes and lowercase characters ("languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin2,282 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP41061052,147
JavaScript3159135

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No 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
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions2195.45%
▷ Anonymous functions14.55%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
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
adwisedicon.png1.15KB0.95KB▼ 17.42%
assets/icon.png41.56KB17.19KB▼ 58.65%
assets/screenshot-1.PNG23.66KB9.68KB▼ 59.10%
assets/adwisedicon.png1.15KB0.95KB▼ 17.42%
screenshot-1.PNG52.34KB22.00KB▼ 57.97%