73% cleverpush

Code Review | CleverPush

WordPress plugin CleverPush scored 73% from 54 tests.

About plugin

  • Plugin page: cleverpush
  • Plugin version: 1.6.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-5.8.1
  • WordPress version: 5.8.1
  • First release: Aug 5, 2016
  • Latest release: Nov 15, 2021
  • Number of updates: 68
  • Update frequency: every 28.3 days
  • Top authors: cleverpush (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 8,231 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.24MB] [CPU: ▼130.61ms] Passed 4 tests

A check of server-side resources used by CleverPush
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.05 ▲0.3346.16 ▲27.58
Dashboard /wp-admin3.29 ▲0.2362.14 ▲13.15
Posts /wp-admin/edit.php3.40 ▲0.2950.69 ▲6.98
Add New Post /wp-admin/post-new.php5.65 ▲0.2198.73 ▼548.68
Media Library /wp-admin/upload.php3.23 ▲0.2339.31 ▲6.10
CleverPush /wp-admin/options-general.php?page=cleverpush_options3.1837.38

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 19 new files
Database: no new tables, 2 new options
New WordPress options
cleverpush_notification_error
cleverpush_notification_result

Browser metrics Passed 4 tests

CleverPush: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,722 ▲12615.82 ▼0.146.18 ▼2.7866.97 ▲20.06
Dashboard /wp-admin2,989 ▲585.91 ▼0.03155.63 ▼0.12121.54 ▲15.78
Posts /wp-admin/edit.php2,758 ▲192.69 ▼0.0069.00 ▲5.6086.27 ▼1.50
Add New Post /wp-admin/post-new.php1,545 ▲4718.65 ▼0.29366.40 ▼7.93110.17 ▲2.07
Media Library /wp-admin/upload.php1,826 ▲165.01 ▼0.04140.73 ▼8.20121.78 ▼3.36
CleverPush /wp-admin/options-general.php?page=cleverpush_options1,2682.4959.4680.88

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 2 options in the database
    • cleverpush_notification_error
    • cleverpush_notification_result

Smoke tests 25% 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 0% 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
Please fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/cleverpush/cleverpush-worker.js.php
    • > /wp-content/plugins/cleverpush/cleverpush-amp.js.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Trying to get property 'ID' of non-object in wp-content/plugins/cleverpush/cleverpush-story.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/cleverpush/cleverpush-story.php:5
    • > PHP Notice
      Trying to get property 'post' of non-object in wp-content/plugins/cleverpush/cleverpush-story.php on line 4

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=cleverpush_options
    • > Javascript (severe) in unknown
    /wp-admin/options-general.php?page=cleverpush_options 242:64 Uncaught TypeError: Cannot read properties of null (reading 'addEventListener')

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: browser notifications, web push, push notifications, woocommerce

cleverpush/cleverpush.php Passed 13 tests

The primary PHP file in "CleverPush" version 1.6.2 is used by WordPress to initiate all plugin functionality
100 characters long description:
Send push notifications to your users right through your website. Visit CleverPush for more details.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected1,796 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP7272311,494
HTML2128129
PO File14148105
CSS15042
JavaScript12025
JSON1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity70.67
▷ Minimum class complexity8.00
▷ Maximum class complexity190.00
Average method complexity5.08
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods38
▷ Static methods37.89%
▷ Public methods38100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png10.81KB3.67KB▼ 66.04%
assets/icon-128x128.png5.81KB2.34KB▼ 59.75%