100% acf-viewer-for-woocommerce

Code Review | ACF viewer for WooCommerce

WordPress plugin ACF viewer for WooCommerce scored 100% from 54 tests.

About plugin

  • Plugin page: acf-viewer-for-wo...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.8.0
  • WordPress version: 5.8.1
  • First release: Sep 18, 2019
  • Latest release: Aug 4, 2021
  • Number of updates: 7
  • Update frequency: every 98.0 days
  • Top authors: olezhyk5 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

70+ active / 1,044 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

Server-side resources used by ACF viewer for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0130.07 ▲6.76
Dashboard /wp-admin3.07 ▲0.0130.42 ▼7.70
Posts /wp-admin/edit.php3.12 ▲0.0133.65 ▼6.19
Add New Post /wp-admin/post-new.php5.43 ▼0.0170.44 ▼590.15
Media Library /wp-admin/upload.php3.01 ▲0.0122.89 ▼1.02

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

ACF viewer for WooCommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,692 ▲4115.59 ▼0.476.62 ▲1.3372.82 ▼5.75
Dashboard /wp-admin2,955 ▲596.10 ▼0.03113.94 ▼19.19164.13 ▼13.90
Posts /wp-admin/edit.php2,770 ▲303.24 ▲0.0264.69 ▲1.99138.56 ▲2.90
Add New Post /wp-admin/post-new.php3,829 ▲9418.92 ▲0.99512.83 ▼2.56161.51 ▼6.66
Media Library /wp-admin/upload.php1,777 ▲255.53 ▲0.01144.79 ▲8.24183.51 ▼4.71

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
No output text or server-side errors detected on direct access of PHP files

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


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
8 plugin tags: acf woocommerce viewer, product, single, acf, advanced custom fields...

acf-viewer-for-woocommerce/acf-woocommerce-viewer.php 92% from 13 tests

The main file in "ACF viewer for WooCommerce" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("acf-viewer-for-woocommerce.php" instead of "acf-woocommerce-viewer.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin2,119 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity13.00
▷ Minimum class complexity3.00
▷ Maximum class complexity25.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods29100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions2887.50%
▷ Anonymous functions412.50%
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings