84% wc-18app

Code Review | WooCommerce 18app

WordPress plugin WooCommerce 18app scored84%from 54 tests.

About plugin

  • Plugin page: wc-18app
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Oct 19, 2018
  • Latest release: May 2, 2023
  • Number of updates: 24
  • Update frequency: every 69.0 days
  • Top authors: ghera74 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /2,424 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

A check of server-side resources used by WooCommerce 18app
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0244.81 ▲3.50
Dashboard /wp-admin3.33 ▼0.0252.20 ▼18.19
Posts /wp-admin/edit.php3.38 ▲0.0250.47 ▼3.12
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.91 ▼26.83
Media Library /wp-admin/upload.php3.25 ▲0.0239.55 ▲4.35

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 36 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce 18app
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▼0.261.67 ▼0.0544.26 ▲0.29
Dashboard /wp-admin2,192 ▲155.53 ▼0.0583.29 ▼6.5639.82 ▼1.64
Posts /wp-admin/edit.php2,097 ▼62.00 ▼0.0138.01 ▼7.0836.11 ▼6.46
Add New Post /wp-admin/post-new.php1,526 ▼022.92 ▼0.80656.88 ▼19.1355.63 ▼4.74
Media Library /wp-admin/upload.php1,397 ▼34.17 ▲0.02111.30 ▲0.1347.30 ▲3.12

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

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
The smoke test was a success, however most plugin functionality was not tested

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
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wc-18app/includes/class-18app-admin.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wc-18app/wc-18app.php:100
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/wc-18app/includes/class-18app-gateway.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wc-18app/includes/ilghera-notice/class-ilghera-notice.php:214
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wc-18app/includes/class-18app.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Ilghera_Notice' not found in wp-content/plugins/wc-18app/includes/ilghera-notice/extension.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
9 plugin tags: woocommerce, bonus cultura, shop, e-commerce, payment...

wc-18app/wc-18app.php 92% from 13 tests

The primary PHP file in "WooCommerce 18app" version 1.3.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected1,395 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP7437364815
CSS56019293
JavaScript35634177
XML100110

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity16.67
▷ Minimum class complexity1.00
▷ Maximum class complexity55.00
Average method complexity3.41
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods39
▷ Static methods410.26%
▷ Public methods3897.44%
▷ Protected methods00.00%
▷ Private methods12.56%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
12 PNG files occupy 0.09MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/tzCheckbox/img/line_bg.png0.26KB0.23KB▼ 9.16%
js/tzCheckbox/jquery.tzCheckbox/background.png4.96KB2.59KB▼ 47.82%
js/tzCheckbox/jquery.tzCheckbox/background-small.png3.88KB2.22KB▼ 42.84%
images/add-cat.png0.49KB0.25KB▼ 49.40%
images/remove-cat-hover.png0.46KB0.21KB▼ 54.08%