90% woo-cashback

Code Review | Woo Cashback

WordPress plugin Woo Cashback scored90%from 54 tests.

About plugin

  • Plugin page: woo-cashback
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.6
  • WordPress version: 6.3.1
  • First release: Mar 28, 2017
  • Latest release: Mar 28, 2017
  • Number of updates: 17
  • Update frequency: every 0.7 days
  • Top authors: saurav2014 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,479 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼5.23ms] Passed 4 tests

Server-side resources used by Woo Cashback
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1141.78 ▼5.76
Dashboard /wp-admin3.41 ▲0.1054.39 ▲0.64
Posts /wp-admin/edit.php3.46 ▲0.1049.57 ▼3.93
Add New Post /wp-admin/post-new.php6.00 ▲0.1086.59 ▼11.88
Media Library /wp-admin/upload.php3.33 ▲0.1040.34 ▲2.39

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 43 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Woo Cashback: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,958 ▲19713.48 ▼1.1111.87 ▲9.8547.08 ▲3.16
Dashboard /wp-admin2,207 ▲275.50 ▼0.1791.86 ▼2.9446.02 ▲3.64
Posts /wp-admin/edit.php2,116 ▲162.04 ▲0.0838.39 ▼0.8035.62 ▼1.02
Add New Post /wp-admin/post-new.php1,540 ▲1223.06 ▲0.16678.89 ▲29.1062.86 ▲7.93
Media Library /wp-admin/upload.php1,412 ▲184.23 ▲0.01106.72 ▼2.3247.13 ▲2.84

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 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 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
No output text or server-side errors detected on direct access of PHP files

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 Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: user wallet, woo, woocommerce, wallet, cash back...

woo-cashback/woo-cashback.php Passed 13 tests

The main file in "Woo Cashback" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
77 characters long description:
The plugin allows you to cashback to the customers on purchase on your store.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin1,157 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP6155163822
CSS62770279
JavaScript31556

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity41.00
▷ Minimum class complexity2.00
▷ Maximum class complexity80.00
Average method complexity4.48
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
13 PNG files occupy 0.05MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
popup/style1/images/border.png0.07KB0.10KB0.00%
popup/style4/images/border2.png0.11KB0.16KB0.00%
assets/icon-128x128.png11.64KB5.47KB▼ 53.01%
assets/icon-256x256.png31.14KB13.01KB▼ 58.22%
popup/style5/images/controls.png1.98KB2.04KB0.00%