89% sendpulse-web-push

Code Review | SendPulse Free Web Push

WordPress plugin SendPulse Free Web Push scored89%from 54 tests.

About plugin

  • Plugin page: sendpulse-web-push
  • Plugin version: 1.3.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.3.1
  • WordPress version: 6.3.1
  • First release: Apr 8, 2016
  • Latest release: Sep 1, 2023
  • Number of updates: 22
  • Update frequency: every 122.8 days
  • Top authors: sendpulse (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

1,000+ active /27,239 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.89ms] Passed 4 tests

An overview of server-side resources used by SendPulse Free Web Push
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0740.85 ▼1.45
Dashboard /wp-admin3.37 ▲0.0249.22 ▼8.17
Posts /wp-admin/edit.php3.42 ▲0.0646.73 ▲2.12
Add New Post /wp-admin/post-new.php5.95 ▲0.0679.21 ▼24.05
Media Library /wp-admin/upload.php3.29 ▲0.0636.06 ▲3.57
WebPush /wp-admin/admin.php?page=sendpulse-web-push/settings.php3.2632.97
FAQ /wp-admin/admin.php?page=sendpulse-web-push/faq.php3.2630.24
Settings /wp-admin/admin.php?page=manage_options3.2631.30

Server storage [IO: ▲0.05MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for SendPulse Free Web Push
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲8013.56 ▼1.191.69 ▼0.1545.18 ▲2.24
Dashboard /wp-admin2,235 ▲445.79 ▲0.93101.74 ▲0.0767.45 ▲25.35
Posts /wp-admin/edit.php2,115 ▲292.01 ▼0.0136.82 ▼0.1133.33 ▼0.09
Add New Post /wp-admin/post-new.php1,536 ▲2223.08 ▲5.39724.04 ▲38.5652.40 ▼4.86
Media Library /wp-admin/upload.php1,408 ▲234.13 ▼0.10103.06 ▼3.6447.56 ▲3.68
WebPush /wp-admin/admin.php?page=sendpulse-web-push/settings.php8352.0224.5926.69
FAQ /wp-admin/admin.php?page=sendpulse-web-push/faq.php8342.0223.9831.04
Settings /wp-admin/admin.php?page=manage_options8382.0224.7734.69

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 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)
Good news, no errors were detected

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

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: Too many tags (33 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

sendpulse-web-push/init.php 77% from 13 tests

The entry point to "SendPulse Free Web Push" version 1.3.1 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("sendpulse-web-push.php" instead of "init.php")
  • Description: The description should be shorter than 140 characters (currently 632 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin538 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP55123278
PO File24369198
JavaScript39455
JSON1005
CSS1002

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/menu_icon.png0.67KB0.71KB0.00%