84% push-agent

Code Review | PUSH AGENT - WordPress plugin for Web Notification

WordPress plugin PUSH AGENT - WordPress plugin for Web Notification scored84%from 54 tests.

About plugin

  • Plugin page: push-agent
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.0
  • WordPress version: 6.3.1
  • First release: Aug 2, 2022
  • Latest release: Aug 5, 2022
  • Number of updates: 5
  • Update frequency: every 0.8 days
  • Top authors: pushagent (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /468 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

A check of server-side resources used by PUSH AGENT - WordPress plugin for Web Notification
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.36 ▼4.04
Dashboard /wp-admin3.31 ▲0.0146.41 ▲0.36
Posts /wp-admin/edit.php3.36 ▲0.0146.11 ▼1.67
Add New Post /wp-admin/post-new.php5.89 ▲0.0189.93 ▼5.86
Media Library /wp-admin/upload.php3.23 ▲0.0134.57 ▲0.72

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for PUSH AGENT - WordPress plugin for Web Notification
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲5513.28 ▼1.0314.21 ▲11.7140.76 ▼2.70
Dashboard /wp-admin2,210 ▲194.86 ▼0.0499.35 ▼0.8940.29 ▼2.55
Posts /wp-admin/edit.php2,096 ▲72.04 ▲0.0342.39 ▲2.2743.70 ▲6.49
Add New Post /wp-admin/post-new.php1,540 ▼218.29 ▼0.02651.79 ▲26.3555.43 ▼4.45
Media Library /wp-admin/upload.php1,392 ▲14.20 ▼0.0194.28 ▼3.5940.88 ▲0.10
Push Agent /wp-admin/options-general.php?page=Push Agent8492.0122.2327.72

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/push-agent/pushagent.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/push-agent/pushagent-admin.php:90

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 errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
1 plugin tags: web push notification

push-agent/pushagent.php 85% from 13 tests

The main PHP script in "PUSH AGENT - WordPress plugin for Web Notification" version 1.0.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 436 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("push-agent.php" instead of "pushagent.php")

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
Good job! No executable or dangerous file extensions detected154 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23513154

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.57
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%
Functions3
▷ Named functions3100.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
7 PNG files occupy 0.38MB with 0.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-5.png47.73KB15.32KB▼ 67.90%
assets/screenshot-6.png16.31KB7.07KB▼ 56.65%
assets/screenshot-4.png46.54KB17.15KB▼ 63.15%
assets/screenshot-2.png19.38KB6.26KB▼ 67.70%
assets/screenshot-3.png14.82KB4.41KB▼ 70.27%