10% diller-loyalty

Code Review | Diller Loyalty

WordPress plugin Diller Loyalty scored10%from 54 tests.

About plugin

  • Plugin page: diller-loyalty
  • Plugin version: 2.3.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0.1
  • WordPress version: 6.3.1
  • First release: Jan 9, 2022
  • Latest release: Aug 25, 2022
  • Number of updates: 20
  • Update frequency: every 11.6 days
  • Top authors: dillerapp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /1,423 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.

Server metrics [RAM: ▲1.45MB] [CPU: ▲2.65ms] Passed 4 tests

Analyzing server-side resources used by Diller Loyalty
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /5.03 ▲1.5744.48 ▲2.77
Dashboard /wp-admin4.79 ▲1.4852.75 ▲1.65
Posts /wp-admin/edit.php4.84 ▲1.4855.33 ▲9.20
Add New Post /wp-admin/post-new.php7.32 ▲1.4493.28 ▼3.04
Media Library /wp-admin/upload.php4.65 ▲1.4246.02 ▲12.27

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 1,783 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
_diller_store_configs
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Diller Loyalty
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,866 ▲13113.90 ▼0.481.80 ▲0.0654.25 ▲9.69
Dashboard /wp-admin2,235 ▲445.40 ▲0.49112.00 ▲8.9680.09 ▲42.19
Posts /wp-admin/edit.php2,133 ▲442.27 ▲0.2739.96 ▲5.0334.66 ▲0.15
Add New Post /wp-admin/post-new.php1,564 ▲3023.55 ▲0.29779.07 ▲98.3138.47 ▼24.28
Media Library /wp-admin/upload.php1,420 ▲324.75 ▲0.5098.14 ▼12.6179.95 ▲31.11

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • widget_recent-posts
    • _diller_store_configs
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 24× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Diller_Loyalty_Stamp' not found in wp-content/plugins/diller-loyalty/includes/class-diller-loyalty-coupon.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Diller_Base_Field' not found in wp-content/plugins/diller-loyalty/includes/forms/fields/class-diller-date-field.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Diller_Form' not found in wp-content/plugins/diller-loyalty/includes/forms/class-diller-wc-update-phone-form.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Diller_Base_Field' not found in wp-content/plugins/diller-loyalty/includes/forms/fields/class-diller-radio-field.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Diller_Form_Element' not found in wp-content/plugins/diller-loyalty/includes/forms/fields/class-diller-submit-button.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'libphonenumber\\Leniency\\AbstractLeniency' not found in wp-content/plugins/diller-loyalty/vendor/giggsey/libphonenumber-for-php/src/Leniency/Possible.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Diller_Base_Field' not found in wp-content/plugins/diller-loyalty/includes/forms/fields/class-diller-hidden-field.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Diller_Base_Field' not found in wp-content/plugins/diller-loyalty/includes/forms/fields/class-diller-checkbox-multi.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Diller_Base_Field' not found in wp-content/plugins/diller-loyalty/includes/forms/fields/class-diller-checkbox-field.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Diller_Base_Field' not found in wp-content/plugins/diller-loyalty/includes/forms/fields/class-diller-email-field.php:10

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots do not have images: #8 (Cart: Loyalty Program Coupons), #10 (Diller customization and settings page)
You can look at the official readme.txt

diller-loyalty/diller-loyalty.php Passed 13 tests

"Diller Loyalty" version 2.3.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
137 characters long description:
Diller is a loyalty platform for businesses that is easy, affordable and profitable and integrates seamlessly with your WooCommerce shop.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin612,217 lines of code in 1,632 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,4255,03920,187598,522
JavaScript1917908759,996
PO File36249871,797
CSS283127601
JSON410590
Markdown41810454
SVG300257

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity19.44
▷ Minimum class complexity1.00
▷ Maximum class complexity367.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces8
Interfaces4
Traits1
Classes96
▷ Abstract classes55.21%
▷ Concrete classes9194.79%
▷ Final classes1213.19%
Methods1,062
▷ Static methods15614.69%
▷ Public methods92787.29%
▷ Protected methods767.16%
▷ Private methods595.56%
Functions112
▷ Named functions8979.46%
▷ Anonymous functions2320.54%
Constants172
▷ Global constants1911.05%
▷ Class constants15388.95%
▷ Public constants15299.35%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.23MB with 0.15MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/intl-tel-input/flags.png69.20KB23.42KB▼ 66.16%
assets/images/intl-tel-input/flags@2x.png170.28KB68.04KB▼ 60.04%