84% zmpush-web-push-notifications

Code Review | ZMPush - Web Push Notifications

WordPress plugin ZMPush - Web Push Notifications scored84%from 54 tests.

About plugin

  • Plugin page: zmpush-web-push-n...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.2
  • WordPress version: 6.3.1
  • First release: Oct 17, 2017
  • Latest release: May 5, 2019
  • Number of updates: 10
  • Update frequency: every 56.7 days
  • Top authors: zuestmedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /790 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

A check of server-side resources used by ZMPush - Web Push Notifications
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0822.83 ▼21.07
Dashboard /wp-admin3.31 ▲0.0150.01 ▼14.52
Posts /wp-admin/edit.php3.37 ▲0.0150.92 ▼6.54
Add New Post /wp-admin/post-new.php5.89 ▲0.01101.41 ▼7.02
Media Library /wp-admin/upload.php3.24 ▲0.0138.50 ▲1.55
ZMPush /wp-admin/options-general.php?page=zmpush-web-push-notifications3.2032.95

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for ZMPush - Web Push Notifications
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.28 ▼0.342.14 ▲0.0644.28 ▼1.26
Dashboard /wp-admin2,202 ▲255.59 ▲0.0694.69 ▼6.1546.14 ▲0.86
Posts /wp-admin/edit.php2,107 ▲72.01 ▲0.0340.22 ▲3.7436.75 ▼1.14
Add New Post /wp-admin/post-new.php1,529 ▲123.24 ▼0.10686.71 ▲7.3955.26 ▼12.94
Media Library /wp-admin/upload.php1,407 ▲74.20 ▼0.02102.43 ▼10.3844.53 ▼3.59
ZMPush /wp-admin/options-general.php?page=zmpush-web-push-notifications7952.0323.3631.96

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 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/zmpush-web-push-notifications/zmpush-web-push-notifications.php:12

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)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: push, web push, web push notifications, push notifications, browser push

zmpush-web-push-notifications/zmpush-web-push-notifications.php Passed 13 tests

"ZMPush - Web Push Notifications" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
53 characters long description:
Premium Web Push Notifications Solution for WordPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin62 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP19961
JavaScript1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin