73% woocommerce-superfaktura

Code Review | WooCommerce SuperFaktura

WordPress plugin WooCommerce SuperFaktura scored 73% from 54 tests.

About plugin

  • Plugin page: woocommerce-super...
  • Plugin version: 1.11.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7.0-5.9.2
  • WordPress version: 5.9.2
  • First release: Mar 21, 2015
  • Latest release: Mar 23, 2022
  • Number of updates: 228
  • Update frequency: every 11.2 days
  • Top authors: superfaktura (83.77%)JohnnyPea (10.53%)webikon (4.82%)kravco (2.19%)

Code review

54 tests

User reviews

9 reviews

Install metrics

2,000+ active / 47,782 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.46MB] [CPU: ▼311.01ms] Passed 4 tests

Server-side resources used by WooCommerce SuperFaktura
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.99 ▲0.4759.10 ▲2.13
Dashboard /wp-admin3.88 ▲0.4742.64 ▲2.22
Posts /wp-admin/edit.php4.10 ▲0.4649.64 ▼3.86
Add New Post /wp-admin/post-new.php7.40 ▲0.43102.69 ▼1,244.52
Media Library /wp-admin/upload.php3.82 ▲0.5329.57 ▲4.08

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 30 new files
Database: 1 new table, 1 new option
New tables
wp_wc_sf_log
New WordPress options
wc_sf_db_version

Browser metrics Passed 4 tests

WooCommerce SuperFaktura: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,186 ▼53616.20 ▲0.530.36 ▼5.8637.46 ▲35.18
Dashboard /wp-admin2,893 ▲326.19 ▼0.09117.99 ▼17.78153.85 ▼4.85
Posts /wp-admin/edit.php2,693 ▼13.25 ▲0.0163.88 ▼1.81138.15 ▼11.99
Add New Post /wp-admin/post-new.php1,672 ▲1121.42 ▲4.74370.16 ▼28.48152.49 ▼11.11
Media Library /wp-admin/upload.php1,703 ▲55.56 ▲0.03146.64 ▲10.07177.40 ▼4.72

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_wc_sf_log
  • Zombie WordPress options were found after uninstall: 1 option
    • wc_sf_db_version

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Interface 'Requests_Transport' not found in wp-content/plugins/woocommerce-superfaktura/vendors/Requests/Transport/fsockopen.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Settings_Page' not found in wp-content/plugins/woocommerce-superfaktura/includes/class-wc-settings-superfaktura.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'Requests_Auth' not found in wp-content/plugins/woocommerce-superfaktura/vendors/Requests/Auth/Basic.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Requests_Transport' not found in wp-content/plugins/woocommerce-superfaktura/vendors/Requests/Transport/cURL.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: faktura, woocommerce, superfaktura, invoice, proforma

woocommerce-superfaktura/wc-superfaktura.php 69% from 13 tests

Analyzing the main PHP file in "WooCommerce SuperFaktura" version 1.11.8
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 212 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woocommerce-superfaktura.php" instead of "wc-superfaktura.php")
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.4" instead of "3.7.0")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected6,419 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP191,0962,2275,251
PO File24485481,073
JavaScript227695

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity46.95
▷ Minimum class complexity1.00
▷ Maximum class complexity404.00
Average method complexity4.21
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces2
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods218
▷ Static methods3917.89%
▷ Public methods17278.90%
▷ Protected methods177.80%
▷ Private methods2913.30%
Functions5
▷ Named functions120.00%
▷ Anonymous functions480.00%
Constants17
▷ Global constants00.00%
▷ Class constants17100.00%
▷ Public constants17100.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/ok.png0.98KB0.35KB▼ 64.45%
images/fail.png1.24KB0.43KB▼ 65.36%