78% wc-variation-limit

Code Review | Products Variation Limit

WordPress plugin Products Variation Limit scored78%from 54 tests.

About plugin

  • Plugin page: wc-variation-limit
  • Plugin version: 1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8
  • WordPress version: 6.3.1
  • First release: May 3, 2020
  • Latest release: May 3, 2020
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: souravsobti0071 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /338 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Products Variation Limit
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.24 ▼5.39
Dashboard /wp-admin3.33 ▼0.0248.76 ▼15.99
Posts /wp-admin/edit.php3.38 ▲0.0253.17 ▼1.70
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.49 ▼23.53
Media Library /wp-admin/upload.php3.26 ▲0.0235.64 ▼0.65
Variations Limit /wp-admin/admin.php?page=wvl-page3.2032.53

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Products Variation Limit
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.24 ▼0.001.93 ▼0.0638.05 ▼4.23
Dashboard /wp-admin2,195 ▲185.58 ▼0.0095.59 ▲3.9437.49 ▼7.94
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0640.57 ▲3.6238.57 ▲4.63
Add New Post /wp-admin/post-new.php1,526 ▼323.17 ▼0.35662.42 ▲14.2655.00 ▲4.49
Media Library /wp-admin/upload.php1,397 ▼34.25 ▲0.0097.94 ▼10.2245.43 ▼0.31
Variations Limit /wp-admin/admin.php?page=wvl-page7902.0025.1028.15

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=wvl-page
    • > Notice in wp-content/plugins/wc-variation-limit/wvl.php+100
    Undefined index: default

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
Please fix the following items
  • 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/wc-variation-limit/wvl.php:29

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 93% from 29 tests

readme.txt 94% 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:
  • Contributors: The plugin contributors field is not present
You can take inspiration from this readme.txt

wc-variation-limit/wvl.php 92% from 13 tests

The main file in "Products Variation Limit" v. 1.0 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: It is recommended to name the main PHP file as the plugin slug ("wc-variation-limit.php" instead of "wvl.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin80 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1232080

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin