84% woo-total-sales

Code Review | Woo Total Sales

WordPress plugin Woo Total Sales scored84%from 54 tests.

About plugin

  • Plugin page: woo-total-sales
  • Plugin version: 3.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.5
  • WordPress version: 6.3.1
  • First release: Feb 15, 2016
  • Latest release: Oct 8, 2020
  • Number of updates: 38
  • Update frequency: every 44.7 days
  • Top authors: shivashankerbhatta (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

1,000+ active /83,934 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.16ms] Passed 4 tests

An overview of server-side resources used by Woo Total Sales
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.95 ▼1.82
Dashboard /wp-admin3.31 ▲0.0049.04 ▼6.46
Posts /wp-admin/edit.php3.36 ▲0.0048.02 ▼6.34
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.24 ▼6.01
Media Library /wp-admin/upload.php3.23 ▲0.0036.48 ▲5.24

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Woo Total Sales
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.28 ▼1.021.86 ▲0.2047.61 ▲0.11
Dashboard /wp-admin2,209 ▲214.85 ▼1.06103.01 ▲1.9839.36 ▼7.24
Posts /wp-admin/edit.php2,089 ▼02.05 ▼0.0142.24 ▲2.9833.80 ▲0.18
Add New Post /wp-admin/post-new.php1,533 ▲1023.23 ▲0.18682.73 ▲36.6252.68 ▼13.14
Media Library /wp-admin/upload.php1,382 ▼04.21 ▲0.0297.23 ▼4.8147.35 ▲2.23

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
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/woo-total-sales/aankha-woo-total-sales.php

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 93% 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
7 plugin tags: reports, woocommerce, total sales, sales overview, shop...

woo-total-sales/aankha-woo-total-sales.php 85% from 13 tests

"Woo Total Sales" version 3.1.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 214 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-total-sales.php" instead of "aankha-woo-total-sales.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin1,932 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP115023431,420
CSS212939478
JavaScript12023
SVG10011

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity18.25
▷ Minimum class complexity1.00
▷ Maximum class complexity41.00
Average method complexity3.56
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods54
▷ Static methods59.26%
▷ Public methods5092.59%
▷ Protected methods00.00%
▷ Private methods47.41%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/empty-clipboard.png16.66KB6.95KB▼ 58.26%