83% wc-tips-and-donation

Code Review | Tips & Donation for WooCommerce

WordPress plugin Tips & Donation for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: wc-tips-and-donation
  • Plugin version: 0.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.5
  • WordPress version: 6.3.1
  • First release: Jun 26, 2020
  • Latest release: Aug 23, 2020
  • Number of updates: 3
  • Update frequency: every 19.3 days
  • Top authors: dipakbbsr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /424 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼3.68ms] Passed 4 tests

Server-side resources used by Tips & Donation for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0728.31 ▼13.66
Dashboard /wp-admin3.39 ▲0.0950.26 ▼2.24
Posts /wp-admin/edit.php3.50 ▲0.1549.25 ▲2.34
Add New Post /wp-admin/post-new.php5.99 ▲0.1097.02 ▼1.16
Media Library /wp-admin/upload.php3.31 ▲0.0839.06 ▲2.51

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Tips & Donation for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,469 ▼27713.20 ▼1.100.57 ▼1.3619.46 ▼25.39
Dashboard /wp-admin2,210 ▲224.90 ▼0.07109.44 ▼32.8742.16 ▼11.29
Posts /wp-admin/edit.php2,093 ▲31.99 ▼0.0240.95 ▲4.2133.77 ▲0.81
Add New Post /wp-admin/post-new.php1,518 ▼1523.14 ▼0.09659.81 ▼34.6461.75 ▲5.84
Media Library /wp-admin/upload.php1,392 ▲44.21 ▲0.0494.65 ▼12.4243.30 ▼1.66

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/wc-tips-and-donation/public/views/form.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: woocommerce donation, donate, order tips, tips, tip

wc-tips-and-donation/wc-tips-and-donations.php 77% from 13 tests

The entry point to "Tips & Donation for WooCommerce" version 0.0.2 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.0" instead of "3.0")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wc-tips-and-donation.php" instead of "wc-tips-and-donations.php")

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 plugin385 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP8128391298
JavaScript215347
CSS28840

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity3.60
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.42
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods31
▷ Static methods00.00%
▷ Public methods2683.87%
▷ Protected methods00.00%
▷ Private methods516.13%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected