84% truepush-free-web-push-notifications

Code Review | Truepush - Most Affordable Web Push Notifications

WordPress plugin Truepush - Most Affordable Web Push Notifications scored 84% from 54 tests.

About plugin

  • Plugin page: truepush-free-web...
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.2.2
  • WordPress version: 6.3.1
  • First release: Jan 6, 2021
  • Latest release: Aug 2, 2023
  • Number of updates: 33
  • Update frequency: every 28.5 days
  • Top authors: truepushplugin (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

2,000+ active / 14,659 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.10MB] [CPU: ▼0.66ms] Passed 4 tests

Analyzing server-side resources used by Truepush - Most Affordable Web Push Notifications
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.76 ▲2.63
Dashboard /wp-admin3.32 ▲0.0249.54 ▲4.61
Posts /wp-admin/edit.php3.37 ▲0.0245.85 ▲3.58
Add New Post /wp-admin/post-new.php5.45 ▼0.4372.41 ▼9.42
Media Library /wp-admin/upload.php3.24 ▲0.0237.56 ▲0.59

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Truepush - Most Affordable Web Push Notifications
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,859 ▲7013.27 ▲0.019.90 ▲8.1545.98 ▲3.38
Dashboard /wp-admin2,233 ▲304.86 ▼0.02100.31 ▲0.8939.47 ▲3.46
Posts /wp-admin/edit.php2,118 ▲292.04 ▲0.0735.86 ▲2.0932.61 ▼1.59
Add New Post /wp-admin/post-new.php6,533 ▲5,00020.12 ▼3.02887.17 ▲213.7852.42 ▼3.91
Media Library /wp-admin/upload.php1,412 ▲214.25 ▲0.0994.81 ▼7.8945.33 ▼2.70

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Please take a closer look at the following
  • 6× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/truepush-free-web-push-notifications/truepush-main.php
    • > /wp-content/plugins/truepush-free-web-push-notifications/truepush.php
    • > /wp-content/plugins/truepush-free-web-push-notifications/truepush-active.php
    • > /wp-content/plugins/truepush-free-web-push-notifications/truepush-public.php
    • > /wp-content/plugins/truepush-free-web-push-notifications/sw2.php
    • > /wp-content/plugins/truepush-free-web-push-notifications/views/index.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
The official readme.txt might help

truepush-free-web-push-notifications/truepush.php 92% from 13 tests

The main file in "Truepush - Most Affordable Web Push Notifications" v. 1.0.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("truepush-free-web-push-notifications.php" instead of "truepush.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,684 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP699151,008
CSS39846550
JavaScript2143110
SVG20016

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity47.00
▷ Minimum class complexity7.00
▷ Maximum class complexity82.00
Average method complexity5.09
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods36
▷ Static methods2980.56%
▷ Public methods36100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
8 PNG files occupy 0.14MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
views/images/settings.png17.33KB9.93KB▼ 42.67%
views/images/notification.png22.08KB13.57KB▼ 38.56%
views/images/h-box+.png28.84KB12.85KB▼ 55.44%
views/images/tp_logo_w.png36.91KB19.49KB▼ 47.20%
views/images/logo.png0.38KB0.27KB▼ 30.00%