78% push-notification

Code Review | Push Notifications for WP & AMP

WordPress plugin Push Notifications for WP & AMP scored78%from 54 tests.

About plugin

  • Plugin page: push-notification
  • Plugin version: 1.31
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: Dec 20, 2019
  • Latest release: Oct 30, 2023
  • Number of updates: 87
  • Update frequency: every 16.2 days
  • Top authors: magazine3 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

3,000+ active /90,945 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.45MB] [CPU: ▲2.63ms] Passed 4 tests

An overview of server-side resources used by Push Notifications for WP & AMP
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.03 ▲0.5639.26 ▲0.84
Dashboard /wp-admin3.74 ▲0.4346.74 ▼2.03
Posts /wp-admin/edit.php3.85 ▲0.4950.79 ▲5.34
Add New Post /wp-admin/post-new.php6.34 ▲0.45100.67 ▲7.75
Media Library /wp-admin/upload.php3.67 ▲0.4338.74 ▲6.36
Upgrade To Premium /wp-admin/admin.php?page=javasctipt:void(0);3.4725.37
Settings /wp-admin/admin.php?page=push-notification3.6640.54

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Push Notifications for WP & AMP: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲9114.61 ▲0.251.54 ▼0.0841.63 ▲3.17
Dashboard /wp-admin2,243 ▲695.65 ▲0.1091.16 ▼0.2738.34 ▼1.22
Posts /wp-admin/edit.php2,151 ▲512.02 ▲0.0141.59 ▲3.3938.74 ▲4.61
Add New Post /wp-admin/post-new.php1,565 ▲2922.96 ▲4.79592.42 ▼16.8254.76 ▼15.03
Media Library /wp-admin/upload.php1,451 ▲574.25 ▲0.0696.56 ▼2.2143.48 ▼1.05
Upgrade To Premium /wp-admin/admin.php?page=javasctipt:void(0);280.420.063.70
Settings /wp-admin/admin.php?page=push-notification1,1353.5254.7732.97

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 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 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× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/push-notification/inc/frontend/amp-pn-subscribe.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/push-notification/inc/admin/deactivate-feedback.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=javasctipt:void(0);
    • > Network (severe)
    wp-admin/admin.php?page=javasctipt:void(0); - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
There were no plugin tags found

push-notification/push-notification.php Passed 13 tests

"Push Notifications for WP & AMP" version 1.31's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
134 characters long description:
Push Notification allow admin to automatically notify your audience when you have published new content on your site or custom notices

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
There were no executable files found in this plugin4,042 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP103671612,507
JavaScript9155801,216
PO File28282200
CSS345119

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity60.00
▷ Minimum class complexity5.00
▷ Maximum class complexity197.00
Average method complexity4.77
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods94
▷ Static methods1920.21%
▷ Public methods9196.81%
▷ Protected methods33.19%
▷ Private methods00.00%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) assets/image/bell-icon.png7.09KB0.00KB▼ 100.00%
assets/image/bell.png0.54KB0.44KB▼ 18.92%