10% automate-chrome-push-notifications

Code Review | Automate Chrome Push Notifications

WordPress plugin Automate Chrome Push Notifications scored10%from 54 tests.

About plugin

  • Plugin page: automate-chrome-p...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.2
  • WordPress version: 6.3.1
  • First release: Sep 27, 2016
  • Latest release: Jan 26, 2018
  • Number of updates: 8
  • Update frequency: every 60.8 days
  • Top authors: aklamator (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /858 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method ChromePushAutomate::set_up_options() should not be called statically

Server metrics [RAM: ▲0.09MB] [CPU: ▼5.69ms] Passed 4 tests

A check of server-side resources used by Automate Chrome Push Notifications
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0947.45 ▲4.33
Dashboard /wp-admin3.39 ▲0.0951.57 ▲2.39
Posts /wp-admin/edit.php3.50 ▲0.1447.19 ▼5.29
Add New Post /wp-admin/post-new.php5.97 ▲0.0985.49 ▼17.47
Media Library /wp-admin/upload.php3.31 ▲0.0838.25 ▼2.38

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 12 new options
New WordPress options
aklamatorChromeApplicationID
widget_recent-comments
aklamatorChromeFeatured2Feed
aklamatorChromePostTypes
aklamatorChromeWriteFile
aklamatorChromePoweredBy
can_compress_scripts
aklamatorChromeSiteKey
widget_theysaidso_widget
widget_recent-posts
...

Browser metrics Passed 4 tests

Automate Chrome 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,863 ▲10213.31 ▼1.004.73 ▲3.1042.80 ▼0.28
Dashboard /wp-admin2,229 ▲655.86 ▲0.18114.28 ▲15.4885.87 ▲44.31
Posts /wp-admin/edit.php2,124 ▲242.00 ▼0.0335.32 ▼4.0333.75 ▼0.25
Add New Post /wp-admin/post-new.php6,415 ▲4,87027.51 ▲4.381,045.02 ▲344.4561.24 ▼0.15
Media Library /wp-admin/upload.php1,423 ▲234.20 ▼0.05112.77 ▲4.2578.69 ▲29.01

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method ChromePushAutomate::aklamator_uninstall() should not be called statically
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/automate-chrome-push-notifications/views/admin-page.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/automate-chrome-push-notifications/automate-chrome-push-notifications.php:25

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 90% from 29 tests

readme.txt 88% from 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
These attributes need your attention:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === automate-chrome-push-notifications === )
You can take inspiration from this readme.txt

automate-chrome-push-notifications/automate-chrome-push-notifications.php 92% from 13 tests

"Automate Chrome Push Notifications" version 2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 172 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin821 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP3186103485
JavaScript2153196
CSS2163140

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity40.00
▷ Minimum class complexity40.00
▷ Maximum class complexity40.00
Average method complexity2.34
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods29
▷ Static methods310.34%
▷ Public methods2482.76%
▷ Protected methods00.00%
▷ Private methods517.24%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
8 PNG files occupy 0.35MB with 0.21MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/aklamator-icon.png0.75KB0.71KB▼ 6.34%
images/promo-300x200.png77.36KB27.52KB▼ 64.43%
assets/dataTables/images/sort_both.png1.11KB0.25KB▼ 77.46%
images/teaser-810x262.png279.89KB88.35KB▼ 68.43%
assets/dataTables/images/sort_desc.png1.10KB0.17KB▼ 84.15%