10% auto-import-coupons-from-vcommission

Code Review | Auto Import Coupons from vcommission

WordPress plugin Auto Import Coupons from vcommission scored 10% from 54 tests.

About plugin

  • Plugin page: auto-import-coupo...
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.7
  • WordPress version: 6.3.1
  • First release: Mar 14, 2021
  • Latest release: Mar 14, 2021
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: sanoj (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 805 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/auto-import-coupons-from-vcommission/wp-vcommission-coupons.php+25
    Undefined variable: api_key

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

An overview of server-side resources used by Auto Import Coupons from vcommission
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0043.21 ▲2.65
Dashboard /wp-admin3.31 ▲0.0044.21 ▼1.33
Posts /wp-admin/edit.php3.36 ▲0.0048.98 ▲1.02
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.81 ▲0.78
Media Library /wp-admin/upload.php3.23 ▲0.0034.22 ▲1.59

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Auto Import Coupons from vcommission
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.26 ▼1.321.73 ▼0.2343.02 ▼0.63
Dashboard /wp-admin2,206 ▲185.83 ▲0.7596.70 ▼9.5638.15 ▼5.82
Posts /wp-admin/edit.php2,092 ▲32.04 ▼0.0141.51 ▼1.4335.42 ▼0.00
Add New Post /wp-admin/post-new.php1,536 ▲2223.26 ▲5.72582.81 ▼15.5160.18 ▲4.53
Media Library /wp-admin/upload.php1,385 ▼34.17 ▼0.0993.54 ▼6.4141.20 ▼0.99

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/auto-import-coupons-from-vcommission/includes/wp_vc-settings.php:116
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/auto-import-coupons-from-vcommission/includes/wp_vc-function.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: deal, affiliate, coupons, vcommission coupon, deals...

auto-import-coupons-from-vcommission/wp-vcommission-coupons.php 92% from 13 tests

This is the main PHP file of "Auto Import Coupons from vcommission" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("auto-import-coupons-from-vcommission.php" instead of "wp-vcommission-coupons.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 detected222 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP44424222

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity5.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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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 files were detected