79% wc-variations-ajax

Code Review | WC Variations Ajax

WordPress plugin WC Variations Ajax scored79%from 54 tests.

About plugin

  • Plugin page: wc-variations-ajax
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.1.3
  • WordPress version: 6.3.1
  • First release: Aug 21, 2015
  • Latest release: Aug 3, 2023
  • Number of updates: 29
  • Update frequency: every 100.1 days
  • Top authors: nwmcinc (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /2,979 total downloads

Benchmarks

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: ▲0.01MB] [CPU: ▼4.35ms] Passed 4 tests

A check of server-side resources used by WC Variations Ajax
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0139.51 ▼0.14
Dashboard /wp-admin3.32 ▲0.0248.24 ▲0.48
Posts /wp-admin/edit.php3.38 ▲0.0149.41 ▼1.45
Add New Post /wp-admin/post-new.php5.91 ▲0.0185.52 ▼16.30
Media Library /wp-admin/upload.php3.25 ▲0.0138.47 ▲0.73
WC Ajax Variations /wp-admin/options-general.php?page=nwmc_var_ajax3.1933.55

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

WC Variations Ajax: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.33 ▼0.021.85 ▼0.1444.59 ▲2.49
Dashboard /wp-admin2,199 ▲225.63 ▼0.0389.77 ▼7.5437.79 ▼4.26
Posts /wp-admin/edit.php2,104 ▲11.99 ▲0.0239.92 ▲4.7337.44 ▼0.05
Add New Post /wp-admin/post-new.php1,529 ▼923.47 ▼0.00707.58 ▲43.2654.82 ▲3.18
Media Library /wp-admin/upload.php1,404 ▲44.20 ▲0.02107.30 ▲0.4248.55 ▼0.21
WC Ajax Variations /wp-admin/options-general.php?page=nwmc_var_ajax7892.0027.1526.82

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=nwmc_var_ajax
    • > Notice in wp-content/plugins/wc-variations-ajax/wc-variations-ajax.php+54
    Trying to access array offset on value of type bool

SRP 50% from 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wc-variations-ajax/wc-variations-ajax.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: attributes, store, variations, woocommerce

wc-variations-ajax/wc-variations-ajax.php Passed 13 tests

The main PHP file in "WC Variations Ajax" ver. 1.4 adds more information about the plugin and also serves as the entry point for this plugin
58 characters long description:
modify Ajax to allow more variations fix for v2.4 or above

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
Success! There were no dangerous files found in this plugin49 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1331349

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin