84% subscribers-com

Code Review | Subscribers - Free Web Push Notifications

WordPress plugin Subscribers - Free Web Push Notifications scored 84% from 54 tests.

About plugin

  • Plugin page: subscribers-com
  • Plugin version: 1.5.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2
  • WordPress version: 6.3.1
  • First release: Aug 30, 2017
  • Latest release: Aug 10, 2023
  • Number of updates: 40
  • Update frequency: every 54.3 days
  • Top authors: subscribers (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

2,000+ active / 67,428 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.78ms] Passed 4 tests

Server-side resources used by Subscribers - Free Web Push Notifications
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.76 ▲1.79
Dashboard /wp-admin3.32 ▲0.0147.98 ▼4.01
Posts /wp-admin/edit.php3.37 ▲0.0148.64 ▲1.03
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.86 ▼12.88
Media Library /wp-admin/upload.php3.24 ▲0.0136.18 ▲0.75
Subscribers /wp-admin/options-general.php?page=subscribers_options3.2131.49

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

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

Browser metrics Passed 4 tests

Subscribers - Free Web Push Notifications: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲7814.74 ▲0.161.78 ▼0.0248.72 ▼2.08
Dashboard /wp-admin2,219 ▲345.81 ▲0.9297.88 ▼12.6240.39 ▼5.21
Posts /wp-admin/edit.php2,101 ▲122.03 ▲0.0339.44 ▲3.6636.42 ▲2.92
Add New Post /wp-admin/post-new.php1,546 ▲1323.30 ▲0.20667.91 ▲20.3661.25 ▲11.06
Media Library /wp-admin/upload.php1,395 ▲104.22 ▲0.0197.35 ▼15.1542.24 ▼6.68
Subscribers /wp-admin/options-general.php?page=subscribers_options8622.1423.6533.37

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function swpush_sanitize() in wp-content/plugins/subscribers-com/firebase-messaging-sw.js.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/subscribers-com/subscribers.php:39

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 23 tag instead of maximum 10
Please take inspiration from this readme.txt

subscribers-com/subscribers.php 92% from 13 tests

"Subscribers - Free Web Push Notifications" version 1.5.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
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 ("subscribers-com.php" instead of "subscribers.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected144 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP33248144

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.29MB with 0.19MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/source-code-success-1x.png43.87KB18.79KB▼ 57.18%
images/site-id-screenshot.png65.36KB19.03KB▼ 70.89%
images/pc_with_notifications-1x.png186.63KB52.39KB▼ 71.93%