90% acf-viewer-for-woocommerce

Code Review | ACF viewer for WooCommerce

WordPress plugin ACF viewer for WooCommerce scored90%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: 6.3.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

50+ active /1,506 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.97ms] Passed 4 tests

An overview of server-side resources used by ACF viewer for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.83 ▲2.13
Dashboard /wp-admin3.31 ▲0.0043.40 ▼2.55
Posts /wp-admin/edit.php3.36 ▲0.0044.58 ▲1.26
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.28 ▼12.72
Media Library /wp-admin/upload.php3.23 ▲0.0034.98 ▲3.77

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for ACF viewer for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4314.58 ▲0.231.78 ▲0.0343.86 ▲4.19
Dashboard /wp-admin2,210 ▲305.65 ▲0.0684.61 ▼6.9540.87 ▼3.14
Posts /wp-admin/edit.php2,116 ▲192.02 ▼0.0839.36 ▲2.4336.05 ▲2.25
Add New Post /wp-admin/post-new.php1,553 ▲2518.03 ▼4.99589.53 ▼95.5770.30 ▲10.51
Media Library /wp-admin/upload.php1,415 ▲154.27 ▲0.1294.34 ▼10.8342.63 ▼5.60

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests Passed 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 Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: product, acf woocommerce viewer, woocommerce, single, post...

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
Please take the time to fix the following:
  • 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 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected2,119 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP112371991,615
CSS3230349
JavaScript24912155

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
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
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods29
▷ Static methods00.00%
▷ Public methods29100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions32
▷ Named functions2887.50%
▷ Anonymous functions412.50%
Constants4
▷ Global constants4100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/order_arrow.png0.75KB0.75KB0.00%