94% drivefx-woocommerce

Code Review | WooCommerce Plugin for PHC GO

WordPress plugin WooCommerce Plugin for PHC GO scored 94% from 54 tests.

About plugin

  • Plugin page: drivefx-woocommerce
  • Plugin version: 4.6.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.6
  • WordPress version: 5.8.1
  • First release: Aug 31, 2016
  • Latest release: Nov 3, 2021
  • Number of updates: 64
  • Update frequency: every 29.9 days
  • Top authors: phcwordpress (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 1,812 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.86MB] [CPU: ▼140.94ms] Passed 4 tests

This is a short check of server-side resources used by WooCommerce Plugin for PHC GO
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.8940.18 ▲3.08
Dashboard /wp-admin3.96 ▲0.9154.70 ▲9.65
Posts /wp-admin/edit.php4.01 ▲0.9153.32 ▲2.79
Add New Post /wp-admin/post-new.php6.26 ▲0.8398.13 ▼575.12
Media Library /wp-admin/upload.php3.84 ▲0.8438.06 ▲5.50

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 37 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

WooCommerce Plugin for PHC GO: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,702 ▲10616.28 ▲0.8710.06 ▼0.5746.50 ▼8.39
Dashboard /wp-admin2,973 ▲395.87 ▼0.07142.57 ▼8.60119.41 ▲0.81
Posts /wp-admin/edit.php2,739 ▼02.68 ▼0.0169.21 ▼1.8396.59 ▲4.48
Add New Post /wp-admin/post-new.php1,683 ▲10218.77 ▼1.63400.41 ▲12.38116.13 ▼7.66
Media Library /wp-admin/upload.php1,810 ▲35.00 ▼0.03156.91 ▲0.93126.88 ▼1.00

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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
Almost there! Just fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/drivefx-woocommerce/drivefx-woocommerce-settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/drivefx-woocommerce/settings/import-products.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/drivefx-woocommerce/settings/backend.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

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
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (List of All Products), #2 (Initialize plugin and login), #3 (Configurations of plugin)
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

drivefx-woocommerce/drivefx-woocommerce.php Passed 13 tests

The principal PHP file in "WooCommerce Plugin for PHC GO" v. 4.6.0 is loaded by WordPress automatically on each request
76 characters long description:
Easy integration between Woocommerce WordPress and your PHC GO installation.

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
Good job! No executable or dangerous file extensions detected6,053 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP199919335,025
JavaScript24046519
CSS21137508
SVG1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity61.07
▷ Minimum class complexity1.00
▷ Maximum class complexity381.00
Average method complexity9.60
▷ Minimum method complexity1.00
▷ Maximum method complexity95.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods92
▷ Static methods11.09%
▷ Public methods9097.83%
▷ Protected methods00.00%
▷ Private methods22.17%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.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
9 PNG files occupy 0.17MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/list.png0.22KB0.11KB▼ 49.78%
images/woo.png0.89KB0.62KB▼ 30.46%
images/logo_drivefx.png18.17KB5.26KB▼ 71.08%
screenshot-3.png26.61KB14.65KB▼ 44.95%
screenshot-1.png62.19KB33.42KB▼ 46.26%