100% woo-download-credits

Code Review | Woo Credits

WordPress plugin Woo Credits scored 100% from 53 tests.

About plugin

  • Plugin page: woo-download-credits
  • Plugin version: 1.3.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7
  • WordPress version: 5.8.1
  • First release: Jul 17, 2015
  • Latest release: May 28, 2021
  • Number of updates: 64
  • Update frequency: every 33.5 days
  • Top authors: brandonmuth (100%)

Code review

53 tests

User reviews

18 reviews

Install metrics

400+ active / 15,183 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.21MB] [CPU: ▼282.52ms] Passed 4 tests

Server-side resources used by Woo Credits
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.01 ▲0.2937.29 ▲14.31
Dashboard /wp-admin3.30 ▲0.2554.08 ▲14.37
Posts /wp-admin/edit.php3.35 ▲0.2443.85 ▼3.85
Add New Post /wp-admin/post-new.php5.60 ▲0.1791.01 ▼1,139.62
Media Library /wp-admin/upload.php3.18 ▲0.1735.43 ▼0.90

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Woo Credits: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,702 ▲12016.08 ▲0.539.69 ▲1.7950.05 ▼0.70
Dashboard /wp-admin2,962 ▲1155.94 ▲0.07137.65 ▲2.93108.46 ▲2.27
Posts /wp-admin/edit.php2,706 ▲32.69 ▲0.0162.87 ▼9.3193.90 ▼3.56
Add New Post /wp-admin/post-new.php1,486 ▼36718.59 ▼0.54351.01 ▼16.79106.20 ▼1.73
Media Library /wp-admin/upload.php1,772 ▲34.99 ▼0.02147.96 ▲1.96109.73 ▼3.82

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

woo-download-credits/woo-download-credits.php Passed 13 tests

The principal PHP file in "Woo Credits" v. 1.3.6 is loaded by WordPress automatically on each request
126 characters long description:
Lets your customers buy "credits" in bulk, then use those credits for downloadable/virtual products in your Woo Commerce shop.

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
No dangerous file extensions were detected1,216 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP2195111,150
CSS222054
JavaScript23012

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity32.00
▷ Minimum class complexity3.00
▷ Maximum class complexity159.00
Average method complexity3.55
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods73
▷ Static methods1723.29%
▷ Public methods7298.63%
▷ Protected methods00.00%
▷ Private methods11.37%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin