90% wpc-smart-notification

Code Review | WPC Smart Notifications for WooCommerce

WordPress plugin WPC Smart Notifications for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: wpc-smart-notific...
  • Plugin version: 2.3.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Jan 20, 2021
  • Latest release: Oct 26, 2023
  • Number of updates: 44
  • Update frequency: every 22.9 days
  • Top authors: wpclever (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

700+ active /8,894 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼8.57ms] Passed 4 tests

Analyzing server-side resources used by WPC Smart Notifications for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1223.91 ▼13.17
Dashboard /wp-admin3.45 ▲0.1045.76 ▼12.12
Posts /wp-admin/edit.php3.56 ▲0.2043.56 ▼2.92
Add New Post /wp-admin/post-new.php6.05 ▲0.1680.68 ▼6.07
Media Library /wp-admin/upload.php3.37 ▲0.1433.53 ▲0.57
Essential Kit /wp-admin/admin.php?page=wpclever-kit3.3429.18
Smart Notifications /wp-admin/admin.php?page=wpclever-wpcsn3.6439.86
About /wp-admin/admin.php?page=wpclever3.3332.01

Server storage [IO: ▲0.50MB] [DB: ▲0.02MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 52 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WPC Smart Notifications for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,527 ▼23414.11 ▼0.450.55 ▼1.1218.78 ▼21.66
Dashboard /wp-admin2,271 ▲945.54 ▲0.0383.93 ▼6.8967.35 ▲25.09
Posts /wp-admin/edit.php2,176 ▲791.97 ▼0.0333.08 ▼3.0129.39 ▼6.84
Add New Post /wp-admin/post-new.php1,598 ▲7023.33 ▲0.42641.72 ▼24.28100.44 ▲41.65
Media Library /wp-admin/upload.php1,476 ▲764.22 ▲0.0899.67 ▼6.6482.67 ▲35.76
Essential Kit /wp-admin/admin.php?page=wpclever-kit5,7372.1431.6357.92
Smart Notifications /wp-admin/admin.php?page=wpclever-wpcsn2,0553.6265.6664.40
About /wp-admin/admin.php?page=wpclever1,3922.1330.1733.19

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The SRP test was a success

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)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: woo, wpc, woocommerce, smart, notification

wpc-smart-notification/wpc-smart-notification.php Passed 13 tests

Analyzing the main PHP file in "WPC Smart Notifications for WooCommerce" version 2.3.5
64 characters long description:
Increase trust, credibility, and sales with smart notifications.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin10,525 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript81,2953465,308
CSS8448212,654
PHP30445262,491
SVG20172

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity32.91
▷ Minimum class complexity1.00
▷ Maximum class complexity103.00
Average method complexity5.17
▷ Minimum method complexity1.00
▷ Maximum method complexity72.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods84
▷ Static methods1011.90%
▷ Public methods6779.76%
▷ Protected methods00.00%
▷ Private methods1720.24%
Functions4
▷ Named functions00.00%
▷ Anonymous functions4100.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin