78% getback-optimize-web-push-notifications

Code Review | Getback – Optimize & Web Push Notifications

WordPress plugin Getback – Optimize & Web Push Notifications scored78%from 54 tests.

About plugin

  • Plugin page: getback-optimize-...
  • Plugin version: 2.1.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.1
  • WordPress version: 6.3.1
  • First release: Oct 29, 2019
  • Latest release: Feb 9, 2023
  • Number of updates: 32
  • Update frequency: every 37.5 days
  • Top authors: adfocusgmbh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,413 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.27MB] [CPU: ▲4.22ms] Passed 4 tests

A check of server-side resources used by Getback – Optimize & Web Push Notifications
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2346.29 ▼1.86
Dashboard /wp-admin3.64 ▲0.3360.51 ▲6.64
Posts /wp-admin/edit.php3.69 ▲0.3356.66 ▲8.07
Add New Post /wp-admin/post-new.php6.16 ▲0.2896.58 ▲4.04
Media Library /wp-admin/upload.php3.47 ▲0.2449.15 ▲8.83

Server storage [IO: ▲0.20MB] [DB: ▲0.31MB] Passed 3 tests

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Getback – Optimize & Web Push Notifications
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,169 ▲40814.80 ▲0.131.67 ▼0.4348.40 ▲4.59
Dashboard /wp-admin2,575 ▲3726.56 ▲0.70128.11 ▲24.9737.13 ▼1.78
Posts /wp-admin/edit.php2,445 ▲3453.51 ▲1.5451.70 ▲9.3537.51 ▲2.69
Add New Post /wp-admin/post-new.php1,717 ▲17222.48 ▲1.68605.90 ▼82.6529.88 ▼73.92
Media Library /wp-admin/upload.php1,650 ▲2504.13 ▼0.0198.29 ▼13.0847.80 ▲0.20

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

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
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/getback-optimize-web-push-notifications/getback_web_push_notifications.php
    • > /wp-content/plugins/getback-optimize-web-push-notifications/class-getback-admin.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/getback-optimize-web-push-notifications/api/routes.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: webpush, send, push, broadcast, notification

getback-optimize-web-push-notifications/getback_web_push_notifications.php 92% from 13 tests

The main file in "Getback – Optimize & Web Push Notifications" v. 2.1.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("getback-optimize-web-push-notifications.php" instead of "getback_web_push_notifications.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin1,246 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP72893641,239
JavaScript3034
CSS1142
SVG1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity30.17
▷ Minimum class complexity1.00
▷ Maximum class complexity112.00
Average method complexity3.37
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods66
▷ Static methods812.12%
▷ Public methods5989.39%
▷ Protected methods00.00%
▷ Private methods710.61%
Functions17
▷ Named functions15.88%
▷ Anonymous functions1694.12%
Constants1
▷ Global constants1100.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
7 compressed PNG files occupy 0.06MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/ui-icons_777777_256x240.png4.16KB4.17KB0.00%
assets/img/ui-icons_555555_256x240.png4.16KB4.17KB0.00%
assets/img/getback-logo.png31.46KB30.49KB▼ 3.07%
assets/img/ui-icons_cc0000_256x240.png4.16KB4.17KB0.00%
assets/img/ui-icons_777620_256x240.png4.16KB4.17KB0.00%