84% acf-yith-woocommerce-compare-support

Code Review | Advanced Custom Fields YITH WooCommerce Compare support

WordPress plugin Advanced Custom Fields YITH WooCommerce Compare support scored84%from 54 tests.

About plugin

  • Plugin page: acf-yith-woocomme...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.6
  • WordPress version: 6.3.1
  • First release: Oct 30, 2018
  • Latest release: Dec 10, 2020
  • Number of updates: 7
  • Update frequency: every 110.3 days
  • Top authors: olezhyk5 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /2,694 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

This is a short check of server-side resources used by Advanced Custom Fields YITH WooCommerce Compare support
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.45 ▲0.72
Dashboard /wp-admin3.31 ▼0.0444.86 ▼16.10
Posts /wp-admin/edit.php3.36 ▲0.0047.92 ▲2.72
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.58 ▼2.60
Media Library /wp-admin/upload.php3.23 ▲0.0035.32 ▲2.35

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Advanced Custom Fields YITH WooCommerce Compare support
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.27 ▼1.044.87 ▲2.9739.07 ▼6.53
Dashboard /wp-admin2,209 ▲215.86 ▲0.9894.96 ▼26.2538.45 ▼5.75
Posts /wp-admin/edit.php2,095 ▲62.00 ▲0.0440.49 ▲3.9936.43 ▲2.16
Add New Post /wp-admin/post-new.php1,539 ▲223.09 ▲4.71616.71 ▼28.0843.95 ▼12.70
Media Library /wp-admin/upload.php1,388 ▼04.25 ▲0.0799.92 ▲5.3240.85 ▼6.24

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acf-yith-woocommerce-compare-support/advanced-custom-fields-yith-woocommerce-compare-support.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes: You can take inspiration from this readme.txt

acf-yith-woocommerce-compare-support/init.php 92% from 13 tests

The main PHP file in "Advanced Custom Fields YITH WooCommerce Compare support" ver. 1.0.4 adds more information about the plugin and also serves as the entry point for this 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-yith-woocommerce-compare-support.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected405 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP25759314
CSS13065
JavaScript19126

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.76
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions990.00%
▷ Anonymous functions110.00%
Constants3
▷ Global constants3100.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
No PNG images were found in this plugin