10% clearsale-total

Code Review | ClearSale Total

WordPress plugin ClearSale Total scored10%from 54 tests.

About plugin

  • Plugin page: clearsale-total
  • Plugin version: 3.0.19
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Sep 25, 2023
  • Latest release: Oct 10, 2023
  • Number of updates: 8
  • Update frequency: every 5.8 days
  • Top authors: clearsale (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /240 total downloads


Plugin footprint 40% 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
Please fix the following installer errors
  • The plugin did not install without errors
    • > Warning in wp-admin/includes/plugin.php+294
    opendir(wp-content/plugins/woocommerce): failed to open dir: No such file or directory

Server metrics [RAM: ▼0.01MB] [CPU: ▼5.15ms] Passed 4 tests

This is a short check of server-side resources used by ClearSale Total
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.49 ▼4.18
Dashboard /wp-admin3.31 ▼0.0450.82 ▼15.92
Posts /wp-admin/edit.php3.36 ▲0.0053.56 ▲5.12
Add New Post /wp-admin/post-new.php5.89 ▲0.00102.17 ▲2.08
Media Library /wp-admin/upload.php3.23 ▲0.0034.51 ▼2.59

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 34 new files
Database: 1 new table, 6 new options
New tables
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by ClearSale Total
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.68 ▼0.594.42 ▲2.6938.50 ▼0.58
Dashboard /wp-admin2,221 ▲184.85 ▼1.05110.60 ▲4.4042.29 ▼3.63
Posts /wp-admin/edit.php2,100 ▲32.00 ▼0.0140.69 ▲3.2636.00 ▲1.19
Add New Post /wp-admin/post-new.php1,534 ▲323.30 ▼0.19677.73 ▲13.4155.42 ▲2.57
Media Library /wp-admin/upload.php1,400 ▼34.19 ▼0.00128.96 ▲25.1850.52 ▲4.77

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_cs_total_dadosextras
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/clearsale-total/admin/partials/clearsale-total-admin-display.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected


Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Donate link: Please fix this invalid url: ""
You can look at the official readme.txt

clearsale-total/clearsale-total.php Passed 13 tests

The main file in "ClearSale Total" v. 3.0.19 serves as a complement to information provided in readme.txt and as the entry point to the plugin
82 characters long description:
Integração da loja WooCommerce e a ClearSale Total. Segurança para suas vendas.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin3,224 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PO File15454139

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity27.56
▷ Minimum class complexity1.00
▷ Maximum class complexity137.00
Average method complexity5.47
▷ Minimum method complexity1.00
▷ Maximum method complexity56.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
▷ Static methods88.42%
▷ Public methods8791.58%
▷ Protected methods00.00%
▷ Private methods88.42%
▷ Named functions3100.00%
▷ Anonymous functions00.00%
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin