84% simple-woo-affiliate-tracking

Code Review | Simple Woo Affiliate Tracking

WordPress plugin Simple Woo Affiliate Tracking scored 84% from 54 tests.

About plugin

  • Plugin page: simple-woo-affili...
  • Plugin version: 1.00
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 6.3.1
  • First release: Nov 10, 2014
  • Latest release: Nov 19, 2014
  • Number of updates: 4
  • Update frequency: every 2.3 days
  • Top authors: jakebowles (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,180 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

An overview of server-side resources used by Simple Woo Affiliate Tracking
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0043.72 ▲5.90
Dashboard /wp-admin3.31 ▲0.0051.54 ▲7.10
Posts /wp-admin/edit.php3.36 ▲0.0049.86 ▲2.89
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.51 ▼17.39
Media Library /wp-admin/upload.php3.23 ▲0.0036.31 ▲0.19

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Woo Affiliate Tracking
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.23 ▼1.054.06 ▲2.1339.32 ▼2.16
Dashboard /wp-admin2,209 ▲184.87 ▼0.2296.68 ▼7.3337.56 ▼6.27
Posts /wp-admin/edit.php2,089 ▼02.14 ▲0.1336.03 ▼5.8832.66 ▼3.82
Add New Post /wp-admin/post-new.php1,535 ▼123.31 ▼0.09652.70 ▼28.5456.86 ▲0.37
Media Library /wp-admin/upload.php1,388 ▲64.24 ▼0.03113.37 ▲14.9746.15 ▲0.23

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/simple-woo-affiliate-tracking/admin/partials/simple-woo-affiliate-tracking.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === simple-woo-affiliate-tracking === )
The official readme.txt is a good inspiration

simple-woo-affiliate-tracking/simple-woo-affiliate-tracking.php Passed 13 tests

The main PHP file in "Simple Woo Affiliate Tracking" ver. 1.00 adds more information about the plugin and also serves as the entry point for this plugin
67 characters long description:
This plugin tracks WooCommerce sales driven by unique referral ids.

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
There were no executable files found in this plugin258 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP7124338229
JavaScript18029

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity3.80
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.54
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods26
▷ Static methods13.85%
▷ Public methods1973.08%
▷ Protected methods00.00%
▷ Private methods726.92%
Functions1
▷ Named functions1100.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
No PNG images were found in this plugin