79% cleverpush

Code Review | CleverPush

WordPress plugin CleverPush scored79%from 54 tests.

About plugin

  • Plugin page: cleverpush
  • Plugin version: 1.9.5
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-6.4.1
  • WordPress version: 6.3.1
  • First release: Aug 5, 2016
  • Latest release: Nov 16, 2023
  • Number of updates: 87
  • Update frequency: every 30.6 days
  • Top authors: cleverpush (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /20,230 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.05MB] [CPU: ▼0.65ms] 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.52 ▲0.0535.76 ▼3.35
Dashboard /wp-admin3.36 ▲0.0549.79 ▲4.16
Posts /wp-admin/edit.php3.47 ▲0.1153.71 ▲3.53
Add New Post /wp-admin/post-new.php5.94 ▲0.0587.11 ▼6.93
Media Library /wp-admin/upload.php3.28 ▲0.0536.09 ▲4.84
CleverPush /wp-admin/options-general.php?page=cleverpush_options3.2340.34

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 22 new files
Database: no new tables, 8 new options
New WordPress options
cleverpush_notification_error
theysaidso_admin_options
widget_theysaidso_widget
cleverpush_notification_result
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

CleverPush: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲6714.37 ▲0.091.96 ▲0.2545.75 ▲2.05
Dashboard /wp-admin2,206 ▲265.49 ▼0.1692.48 ▼8.5342.17 ▼3.78
Posts /wp-admin/edit.php2,114 ▲142.01 ▲0.0641.43 ▲0.1438.11 ▲0.22
Add New Post /wp-admin/post-new.php6,232 ▲4,70626.02 ▲3.08835.28 ▲146.5953.96 ▼5.63
Media Library /wp-admin/upload.php1,411 ▲144.19 ▲0.02104.89 ▲0.3744.07 ▲0.83
CleverPush /wp-admin/options-general.php?page=cleverpush_options9821.8125.7031.85

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 8 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • cleverpush_notification_error
    • cleverpush_notification_result

Smoke tests 50% 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
  • 3× 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-feed.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 Notice
      Trying to get property 'post' 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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

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: web push, woocommerce, push notifications, browser notifications

cleverpush/cleverpush.php Passed 13 tests

The primary PHP file in "CleverPush" version 1.9.5 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 detected2,144 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP8310361,791
PO File15557148
HTML2128129
CSS15042
JavaScript12025
JSON2009

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.49
Average class complexity76.00
▷ Minimum class complexity8.00
▷ Maximum class complexity206.00
Average method complexity5.16
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods40
▷ Static methods37.50%
▷ Public methods40100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants4
▷ Global constants375.00%
▷ Class constants125.00%
▷ 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-128x128.png5.81KB2.34KB▼ 59.75%
assets/icon-256x256.png10.81KB3.67KB▼ 66.04%