89% track-lk-notification-for-woocommerce

Code Review | Track.LK Notification - WooCommerce

WordPress plugin Track.LK Notification - WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: track-lk-notifica...
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.8
  • WordPress version: 6.3.1
  • First release: Oct 1, 2021
  • Latest release: Oct 1, 2021
  • Number of updates: 10
  • Update frequency: every 2.0 days
  • Top authors: inviulabs (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /265 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.46ms] Passed 4 tests

An overview of server-side resources used by Track.LK Notification - WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0234.97 ▼7.86
Dashboard /wp-admin3.33 ▲0.0245.51 ▼3.77
Posts /wp-admin/edit.php3.45 ▲0.0947.63 ▼2.07
Add New Post /wp-admin/post-new.php5.91 ▲0.0290.61 ▼12.14
Media Library /wp-admin/upload.php3.25 ▲0.0235.85 ▼0.10

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Track.LK Notification - WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6113.24 ▼1.141.71 ▼0.0442.29 ▼1.41
Dashboard /wp-admin2,213 ▲225.83 ▲0.91107.12 ▲1.4039.23 ▼4.80
Posts /wp-admin/edit.php2,095 ▲32.05 ▲0.0840.49 ▼0.4936.19 ▲0.18
Add New Post /wp-admin/post-new.php1,540 ▲2623.18 ▼0.50593.51 ▼21.9647.54 ▼8.25
Media Library /wp-admin/upload.php1,395 ▲104.23 ▲0.0497.48 ▼4.8043.66 ▲0.24

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 83% 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
Attributes that require attention: You can look at the official readme.txt

track-lk-notification-for-woocommerce/tracknofity-notification.php 77% from 13 tests

The main PHP file in "Track.LK Notification - WooCommerce" ver. 1.4 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.3" instead of "3.0")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("track-lk-notification-for-woocommerce.php" instead of "tracknofity-notification.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin973 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP10232298603
JavaScript2985347
CSS26323

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity8.50
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity2.46
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes112.50%
Methods41
▷ Static methods819.51%
▷ Public methods3892.68%
▷ Protected methods00.00%
▷ Private methods37.32%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
No PNG images were found in this plugin