84% notifications-woocommerce

Code Review | Notificações para WooCommerce

WordPress plugin Notificações para WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: notifications-woo...
  • Plugin version: 1.1.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3
  • WordPress version: 6.3.1
  • First release: Sep 22, 2022
  • Latest release: Aug 12, 2023
  • Number of updates: 16
  • Update frequency: every 20.6 days
  • Top authors: drope (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /2,111 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲3.79MB] [CPU: ▲24.58ms] Passed 4 tests

Analyzing server-side resources used by Notificações para WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /7.04 ▲3.5762.95 ▲22.15
Dashboard /wp-admin7.11 ▲3.8170.44 ▲17.24
Posts /wp-admin/edit.php7.23 ▲3.8779.75 ▲28.45
Add New Post /wp-admin/post-new.php9.96 ▲4.07132.59 ▲30.49
Media Library /wp-admin/upload.php7.12 ▲3.8969.73 ▲32.11
Add New /wp-admin/post-new.php?post_type=acf-field-group7.2287.54
Tools /wp-admin/edit.php?post_type=acf-field-group&page=acf-tools7.1159.63
Field Groups /wp-admin/edit.php?post_type=acf-field-group7.1062.56

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 260 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
acf_version
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Notificações para WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲12214.67 ▲0.322.00 ▲0.3544.55 ▲0.74
Dashboard /wp-admin2,259 ▲795.49 ▼0.1085.99 ▼3.5242.32 ▼0.93
Posts /wp-admin/edit.php2,167 ▲642.04 ▲0.0540.65 ▲4.9238.14 ▼0.16
Add New Post /wp-admin/post-new.php11,381 ▲9,85326.37 ▲3.031,216.05 ▲547.2341.43 ▼11.89
Media Library /wp-admin/upload.php2,019 ▲6228.32 ▲4.12228.31 ▲109.8654.11 ▲5.43
Add New /wp-admin/post-new.php?post_type=acf-field-group2,3983.6889.3078.46
Tools /wp-admin/edit.php?post_type=acf-field-group&page=acf-tools1,2312.9143.9539.50
Field Groups /wp-admin/edit.php?post_type=acf-field-group1,2662.2932.4132.79

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • acf_version
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 76× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/notifications-woocommerce/includes/acf/includes/fields/class-acf-field-accordion.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/notifications-woocommerce/includes/acf/includes/fields/class-acf-field-post_object.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/notifications-woocommerce/includes/acf/includes/fields/class-acf-field-image.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/notifications-woocommerce/includes/acf/includes/api/api-template.php:898
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/notifications-woocommerce/includes/acf/includes/fields/class-acf-field-google-map.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field_number' not found in wp-content/plugins/notifications-woocommerce/includes/acf/includes/fields/class-acf-field-range.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/notifications-woocommerce/includes/acf/includes/fields/class-acf-field-output.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/notifications-woocommerce/includes/acf/includes/fields/class-acf-field-tab.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/notifications-woocommerce/includes/acf/includes/fields/class-acf-field-email.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/notifications-woocommerce/includes/acf/includes/admin/views/html-location-group.php:3

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

notifications-woocommerce/notifications-woocommerce.php Passed 13 tests

This is the main PHP file of "Notificações para WooCommerce" version 1.1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
67 characters long description:
Notificações em tempo real do WooCommerce diretamente no WhatsApp

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
Good job! No executable or dangerous file extensions detected113,790 lines of code in 205 files:
LanguageFilesBlank linesComment linesLines of code
PO File3124,10941,34149,290
JavaScript175,8865,98938,456
PHP1408,71218,31219,946
CSS154957396,078
Markdown111014
SVG1006

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity14.87
▷ Minimum class complexity1.00
▷ Maximum class complexity78.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes102
▷ Abstract classes21.96%
▷ Concrete classes10098.04%
▷ Final classes00.00%
Methods748
▷ Static methods10.13%
▷ Public methods73097.59%
▷ Protected methods00.00%
▷ Private methods182.41%
Functions458
▷ Named functions45599.34%
▷ Anonymous functions30.66%
Constants12
▷ Global constants12100.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
7 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/acf/assets/inc/select2/3/select2x2.png0.64KB0.77KB0.00%
includes/acf/assets/inc/select2/3/select2.png0.51KB0.99KB0.00%
includes/acf/assets/inc/datepicker/images/ui-icons_ffffff_256x240.png3.68KB4.17KB0.00%
includes/acf/assets/inc/datepicker/images/ui-bg_highlight-soft_0_ffffff_1x100.png0.08KB0.08KB0.00%
includes/acf/assets/inc/datepicker/images/ui-icons_444444_256x240.png3.68KB4.17KB0.00%