78% push-monkey-light

Code Review | Push Monkey Light - Web Push Notifications

WordPress plugin Push Monkey Light - Web Push Notifications scored78%from 54 tests.

About plugin

  • Plugin page: push-monkey-light
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.9.1
  • WordPress version: 6.3.1
  • First release: Jan 11, 2018
  • Latest release: Jan 11, 2018
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: pushmonkey (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,145 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
Install script ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼3.89ms] Passed 4 tests

Analyzing server-side resources used by Push Monkey Light - Web Push Notifications
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1238.58 ▼1.58
Dashboard /wp-admin3.43 ▲0.1246.98 ▼0.09
Posts /wp-admin/edit.php3.54 ▲0.1847.23 ▼0.81
Add New Post /wp-admin/post-new.php6.00 ▲0.1180.83 ▼13.07
Media Library /wp-admin/upload.php3.35 ▲0.1237.56 ▲4.26

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

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

Browser metrics Passed 4 tests

Push Monkey Light - Web Push Notifications: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,893 ▲13214.39 ▼0.211.83 ▲0.0638.55 ▼6.93
Dashboard /wp-admin2,288 ▲1145.59 ▲0.0394.50 ▲8.3438.94 ▼4.39
Posts /wp-admin/edit.php2,195 ▲952.02 ▲0.0741.43 ▲0.6834.94 ▼5.43
Add New Post /wp-admin/post-new.php1,543 ▲1523.35 ▲0.26698.92 ▲25.1835.98 ▼25.12
Media Library /wp-admin/upload.php1,496 ▲964.08 ▼0.1698.82 ▼9.1741.32 ▲0.01

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/push-monkey-light/templates/pages/service_worker.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/push-monkey-light/templates/pages/settings/main.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/push-monkey-light/templates/pages/settings/log-in.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: Too many tags (21 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

push-monkey-light/push-monkey-light.php 92% from 13 tests

The main PHP file in "Push Monkey Light - Web Push Notifications" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 346 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin21,828 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
CSS962229419,628
SVG500944
PHP10224277685
Markdown21280557
JSON10014

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity13.00
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity2.46
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods41
▷ Static methods12.44%
▷ Public methods41100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants00.00%
▷ Class constants7100.00%
▷ Public constants7100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
77 PNG files occupy 0.58MB with 0.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/jquery/ui-bg_glass_100_f6f6f6_1x400.png0.33KB0.17KB▼ 46.73%
img/plugin-big-message-image.png21.55KB8.51KB▼ 60.48%
img/icons/json.png5.88KB2.00KB▼ 66.03%
img/jquery/ui-icons_228ef1_256x240.png4.54KB4.23KB▼ 6.96%
img/jquery/ui-icons_222222_256x240.png6.73KB4.23KB▼ 37.20%