84% salert

Code Review | SALERT – Fake Sales Notification WooCommerce

WordPress plugin SALERT – Fake Sales Notification WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: salert
  • Plugin version: 1.2.5
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 13, 2018
  • Latest release: Oct 9, 2023
  • Number of updates: 31
  • Update frequency: every 60.8 days
  • Top authors: wpoperations (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

10,000+ active /115,624 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.14MB] [CPU: ▼2.39ms] Passed 4 tests

A check of server-side resources used by SALERT – Fake Sales Notification WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1439.67 ▼0.61
Dashboard /wp-admin3.45 ▲0.1552.32 ▲2.20
Posts /wp-admin/edit.php3.50 ▲0.1447.39 ▼6.41
Add New Post /wp-admin/post-new.php6.03 ▲0.1485.64 ▼3.84
Media Library /wp-admin/upload.php3.38 ▲0.1436.60 ▲1.31

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

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

Browser metrics Passed 4 tests

Checking browser requirements for SALERT – Fake Sales Notification WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲9013.26 ▼1.351.91 ▲0.1545.09 ▲0.79
Dashboard /wp-admin2,205 ▲204.90 ▼0.92115.93 ▲15.2472.19 ▲32.13
Posts /wp-admin/edit.php2,103 ▲142.01 ▲0.0238.00 ▼3.4136.39 ▼4.09
Add New Post /wp-admin/post-new.php1,678 ▲15922.31 ▼0.84680.14 ▼5.9055.97 ▲0.19
Media Library /wp-admin/upload.php1,396 ▲84.19 ▼0.0398.57 ▼12.8943.18 ▼4.10

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
The following issues need your attention
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/salert/inc/how-to-use.php
    • > /wp-content/plugins/salert/salert.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots lack descriptions #1, #2, #3 in salert/assets to your readme.txt
The official readme.txt is a good inspiration

salert/salert.php Passed 13 tests

The main PHP script in "SALERT – Fake Sales Notification WooCommerce" version 1.2.5 is automatically included on every request by WordPress
125 characters long description:
The plugin will generate fake sales notifications, which will help to boost your sales.Also works without WooCommerce Plugin.

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
No dangerous file extensions were detected9,116 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript51,0098046,351
CSS4414301,930
PHP596124835

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity14.00
▷ Minimum class complexity6.00
▷ Maximum class complexity22.00
Average method complexity3.17
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.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
12 PNG files occupy 0.10MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/backend/css/images/ui-icons_777777_256x240.png6.83KB4.17KB▼ 38.92%
inc/images/alert-old.png0.69KB0.74KB0.00%
assets/backend/css/images/placeholder.png0.25KB0.23KB▼ 8.24%
assets/close-icon.png10.26KB10.21KB0.47%
assets/backend/css/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%