89% wc-browser-notify

Code Review | WC Browser Notify

WordPress plugin WC Browser Notify scored89%from 54 tests.

About plugin

  • Plugin page: wc-browser-notify
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0.1
  • WordPress version: 6.3.1
  • First release: Dec 13, 2016
  • Latest release: Jul 29, 2022
  • Number of updates: 6
  • Update frequency: every 341.7 days
  • Top authors: wooninjas (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /623 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.01MB] [CPU: ▼8.94ms] Passed 4 tests

A check of server-side resources used by WC Browser Notify
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.55 ▼2.40
Dashboard /wp-admin3.31 ▼0.0450.33 ▼12.77
Posts /wp-admin/edit.php3.36 ▲0.0044.19 ▼1.76
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.29 ▼18.81
Media Library /wp-admin/upload.php3.23 ▲0.0036.93 ▼0.17

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by WC Browser Notify
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.17 ▼1.201.89 ▼0.2643.68 ▼2.07
Dashboard /wp-admin2,215 ▲125.83 ▲1.00104.87 ▼11.0339.53 ▼10.88
Posts /wp-admin/edit.php2,097 ▼31.97 ▼0.0537.05 ▲2.4135.28 ▼5.49
Add New Post /wp-admin/post-new.php1,526 ▼1917.52 ▼5.67660.14 ▲8.1654.82 ▲3.50
Media Library /wp-admin/upload.php1,394 ▼64.19 ▼0.09103.11 ▲4.3047.39 ▲6.95

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes: The official readme.txt might help

wc-browser-notify/wc-borwser-notify.php 85% from 13 tests

The main PHP file in "WC Browser Notify" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wc-browser-notify.php" instead of "wc-borwser-notify.php")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

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
Success! There were no dangerous files found in this plugin888 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP8124200480
CSS39043301
JavaScript31914107

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity11.00
▷ Minimum class complexity4.00
▷ Maximum class complexity29.00
Average method complexity2.21
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods33
▷ Static methods3296.97%
▷ Public methods3296.97%
▷ Protected methods13.03%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
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
There are no PNG files in this plugin