84% woo-classement

Code Review | Woocommerce Classement

WordPress plugin Woocommerce Classement scored84%from 54 tests.

About plugin

  • Plugin page: woo-classement
  • Plugin version: 3.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7.1-6.3
  • WordPress version: 6.3.1
  • First release: Jun 2, 2018
  • Latest release: Oct 30, 2023
  • Number of updates: 100
  • Update frequency: every 19.8 days
  • Top authors: Viamultimedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,811 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
Install script ran successfully

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

An overview of server-side resources used by Woocommerce Classement
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.78 ▼3.02
Dashboard /wp-admin3.31 ▼0.0447.69 ▼13.64
Posts /wp-admin/edit.php3.36 ▲0.0045.24 ▲1.33
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.30 ▲1.73
Media Library /wp-admin/upload.php3.23 ▲0.0035.54 ▲0.60

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 279 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Woocommerce Classement
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲3914.25 ▼0.171.78 ▲0.1543.15 ▼1.02
Dashboard /wp-admin2,192 ▲185.52 ▼0.0586.64 ▼14.2538.79 ▼2.38
Posts /wp-admin/edit.php2,082 ▼152.02 ▲0.0335.25 ▲1.4133.12 ▼1.27
Add New Post /wp-admin/post-new.php1,535 ▲918.29 ▼4.93616.12 ▼156.8866.61 ▲6.03
Media Library /wp-admin/upload.php1,403 ▲34.18 ▲0.0397.69 ▲1.8943.12 ▲1.50

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, 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
Almost there! Just fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/woo-classement/includes/logo.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/woo-classement/includes/nav-header.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-classement/inc/admin/search/class-woocommerce-classement-admin-search.php:3

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
1 plugin tags: woocommerce statistics

woo-classement/woocommerce-classement.php 92% from 13 tests

The entry point to "Woocommerce Classement" version 3.2 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-classement.php" instead of "woocommerce-classement.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin59,122 lines of code in 180 files:
LanguageFilesBlank linesComment linesLines of code
CSS231,88745522,797
PHP752,2091,15811,527
JavaScript431,7032,0227,838
LESS1426396,503
SVG4033,536
PO File41,0781,5792,811
JSON1002,502
Sass1326241,352
HTML3120256

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity7.54
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity3.12
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods41
▷ Static methods24.88%
▷ Public methods3892.68%
▷ Protected methods12.44%
▷ Private methods24.88%
Functions310
▷ Named functions30999.68%
▷ Anonymous functions10.32%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
25 compressed PNG files occupy 0.18MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
framework/assets/datatables/sort_asc_disabled.png0.14KB0.25KB0.00%
img/19.png49.92KB17.49KB▼ 64.96%
framework/assets/datatables/images/sort_desc.png0.15KB0.25KB0.00%
framework/assets/datatables/sort_desc_disabled.png0.14KB0.25KB0.00%
framework/assets/datatables/images/forward_enabled_hover.png0.43KB0.58KB0.00%