89% live-sales-notification

Code Review | Live Sales Notification

WordPress plugin Live Sales Notification scored89%from 54 tests.

About plugin

  • Plugin page: live-sales-notifi...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.7
  • WordPress version: 6.3.1
  • First release: Aug 10, 2018
  • Latest release: Aug 10, 2018
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: shyamaladevi123 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /768 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.22ms] Passed 4 tests

A check of server-side resources used by Live Sales Notification
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.80 ▼0.72
Dashboard /wp-admin3.31 ▲0.0043.58 ▼8.09
Posts /wp-admin/edit.php3.36 ▲0.0043.22 ▼8.03
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.06 ▼7.80
Media Library /wp-admin/upload.php3.23 ▲0.0036.94 ▼0.97

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Live Sales Notification: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.29 ▼1.084.47 ▲2.5342.08 ▼6.11
Dashboard /wp-admin2,203 ▲125.91 ▲0.01108.67 ▲0.7540.95 ▲1.61
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0236.41 ▼0.8431.76 ▼3.69
Add New Post /wp-admin/post-new.php1,533 ▼223.33 ▼0.13668.55 ▼22.2653.20 ▼1.08
Media Library /wp-admin/upload.php1,391 ▲34.25 ▲0.0398.34 ▼5.7145.41 ▲1.39

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% 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
These attributes need to be fixed:
  • Requires php: Invalid version format
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
You can look at the official readme.txt

live-sales-notification/live-sales-notification.php 85% from 13 tests

The entry point to "Live Sales Notification" version 1.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: Please don't use more than 140 characters for the plugin description (currently 307 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin524 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript11818276
PHP4823248

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions787.50%
▷ Anonymous functions112.50%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 compressed PNG files occupy 0.03MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/notification.png0.68KB0.68KB0.00%
images/closeimg.png1.35KB1.28KB▼ 5.19%
images/no_image.png32.04KB21.64KB▼ 32.45%