83% drivefx-woocommerce

Code Review | WooCommerce Plugin for PHC GO

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

About plugin

  • Plugin page: drivefx-woocommerce
  • Plugin version: 4.9.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.6
  • WordPress version: 6.3.1
  • First release: Aug 31, 2016
  • Latest release: Oct 18, 2023
  • Number of updates: 75
  • Update frequency: every 35.1 days
  • Top authors: phcwordpress (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,661 total downloads


Plugin footprint 83% from 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: ▲1.00MB] [CPU: ▼0.78ms] 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 /4.50 ▲1.0448.98 ▲12.19
Dashboard /wp-admin4.34 ▲1.0047.97 ▼13.68
Posts /wp-admin/edit.php4.39 ▲1.0452.95 ▲8.55
Add New Post /wp-admin/post-new.php6.86 ▲0.9887.02 ▼7.33
Media Library /wp-admin/upload.php4.20 ▲0.9841.95 ▲9.35

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 38 new files
Database: no new tables, 6 new options
New WordPress 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 /2,789 ▲2814.35 ▼0.211.74 ▲0.2143.66 ▲1.86
Dashboard /wp-admin2,195 ▲155.63 ▼0.0883.64 ▼1.8940.27 ▼4.79
Posts /wp-admin/edit.php2,097 ▼32.01 ▲0.0433.51 ▼3.5035.81 ▲3.40
Add New Post /wp-admin/post-new.php1,535 ▼218.40 ▲0.29606.66 ▲3.8672.37 ▼1.26
Media Library /wp-admin/upload.php1,400 ▼04.19 ▲0.04105.57 ▲4.6847.74 ▲7.09

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

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 get_option() in wp-content/plugins/drivefx-woocommerce/drivefx-woocommerce-settings.php:6
    • > 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


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.9.3 is loaded by WordPress automatically on each request
76 characters long description:
Easy integration between Woocommerce WordPress and your PHC GO installation.

Code Analysis 97% from 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,841 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
The following items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 159)
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity66.27
▷ Minimum class complexity1.00
▷ Maximum class complexity453.00
Average method complexity10.04
▷ Minimum method complexity1.00
▷ Maximum method complexity159.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
▷ Static methods10.93%
▷ Public methods10698.15%
▷ Protected methods00.00%
▷ Private methods21.85%
▷ Named functions00.00%
▷ Anonymous functions1100.00%
▷ 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.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/right.png0.30KB0.24KB▼ 21.10%
images/plus.png0.27KB0.16KB▼ 41.24%
images/woo.png0.89KB0.62KB▼ 30.46%
images/update.png0.29KB0.26KB▼ 12.08%
screenshot-2.png61.01KB36.37KB▼ 40.39%