89% urban-airship-web-push-notifications

Code Review | Airship Web Notifications

WordPress plugin Airship Web Notifications scored89%from 54 tests.

About plugin

  • Plugin page: urban-airship-web...
  • Plugin version: 1.3.4
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2
  • WordPress version: 6.3.1
  • First release: Dec 13, 2017
  • Latest release: Jul 30, 2019
  • Number of updates: 25
  • Update frequency: every 24.0 days
  • Top authors: s3rgiosan (84%)rittesh.patel (20%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /10,435 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.35MB] [CPU: ▼6.65ms] Passed 4 tests

An overview of server-side resources used by Airship Web Notifications
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.80 ▲0.3444.99 ▲4.78
Dashboard /wp-admin3.70 ▲0.3951.86 ▲0.03
Posts /wp-admin/edit.php3.75 ▲0.3947.97 ▼3.12
Add New Post /wp-admin/post-new.php6.24 ▲0.3585.95 ▼28.30
Media Library /wp-admin/upload.php3.56 ▲0.3340.54 ▲5.65
Web Notifications /wp-admin/options-general.php?page=ua-web-notification3.56318.09
Add New /wp-admin/post-new.php?post_type=ua-push-notification3.6146.65
All Web Notifications /wp-admin/edit.php?post_type=ua-push-notification3.6041.70

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Airship Web Notifications
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,856 ▲11013.23 ▼1.461.87 ▲0.2044.11 ▲5.09
Dashboard /wp-admin2,262 ▲744.86 ▼0.96106.18 ▲8.4844.78 ▲2.93
Posts /wp-admin/edit.php2,142 ▲532.02 ▼0.0334.31 ▼8.6935.36 ▼1.12
Add New Post /wp-admin/post-new.php6,260 ▲4,73621.64 ▼1.42831.51 ▲170.9954.99 ▼10.32
Media Library /wp-admin/upload.php1,444 ▲564.23 ▲0.0293.72 ▼12.5541.98 ▼0.87
Web Notifications /wp-admin/options-general.php?page=ua-web-notification1,2082.2122.9240.56
Add New /wp-admin/post-new.php?post_type=ua-push-notification1,6283.6360.6132.04
All Web Notifications /wp-admin/edit.php?post_type=ua-push-notification1,1141.9730.8329.58

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention: The official readme.txt might help

urban-airship-web-push-notifications/ua-web-push-notifications.php 85% from 13 tests

The main file in "Airship Web Notifications" v. 1.3.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("urban-airship-web-push-notifications.php" instead of "ua-web-push-notifications.php")

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 plugin1,990 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP73426841,653
CSS2370169
JavaScript43744163
XML1105

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity39.17
▷ Minimum class complexity2.00
▷ Maximum class complexity105.00
Average method complexity3.83
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods81
▷ Static methods11.23%
▷ Public methods7491.36%
▷ Protected methods78.64%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin