78% dealspotr-woocommerce-tracking

Code Review | Dealspotr Campaign Tracking for WooCommerce

WordPress plugin Dealspotr Campaign Tracking for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: dealspotr-woocomm...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.8.1
  • WordPress version: 6.3.1
  • First release: Sep 13, 2017
  • Latest release: Sep 13, 2017
  • Number of updates: 10
  • Update frequency: every 0.2 days
  • Top authors: zipfworks (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /976 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 gracefully, with no errors

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

This is a short check of server-side resources used by Dealspotr Campaign Tracking for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.24 ▼2.90
Dashboard /wp-admin3.31 ▼0.0447.79 ▼20.90
Posts /wp-admin/edit.php3.36 ▲0.0047.42 ▼3.44
Add New Post /wp-admin/post-new.php5.89 ▲0.0096.80 ▼3.04
Media Library /wp-admin/upload.php3.23 ▲0.0036.99 ▲0.17

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Dealspotr Campaign Tracking for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.38 ▲0.082.17 ▼0.0644.84 ▼1.55
Dashboard /wp-admin2,198 ▲185.60 ▼0.1094.69 ▲2.3542.08 ▲4.03
Posts /wp-admin/edit.php2,097 ▼62.06 ▲0.0635.12 ▼3.6133.42 ▼1.80
Add New Post /wp-admin/post-new.php1,545 ▲1423.21 ▼0.12677.11 ▲13.1264.19 ▼6.52
Media Library /wp-admin/upload.php1,400 ▼04.15 ▼0.02111.84 ▲11.6548.58 ▲2.78

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/dealspotr-woocommerce-tracking/dealspotr-woocommerce-tracking.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Integration' not found in wp-content/plugins/dealspotr-woocommerce-tracking/classes/class-dealspotr-wc-integration.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Requires php: Version not formatted correctly
You can look at the official readme.txt

dealspotr-woocommerce-tracking/dealspotr-woocommerce-tracking.php Passed 13 tests

Analyzing the main PHP file in "Dealspotr Campaign Tracking for WooCommerce" version 1.0.0
134 characters long description:
Adds checkout conversion tracking for Dealspotr influencer campaigns, go to "WooCommerce" -> "Settings" -> "Integration" to configure.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected77 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2243377

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity4.00
▷ Minimum class complexity3.00
▷ Maximum class complexity5.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods342.86%
▷ Public methods685.71%
▷ Protected methods00.00%
▷ Private methods114.29%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin