94% auto-s2member-affiliate

Code Review | Auto s2Member Affiliate

WordPress plugin Auto s2Member Affiliate scored 94% from 54 tests.

About plugin

  • Plugin page: auto-s2member-aff...
  • Plugin version: 1.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.5
  • WordPress version: 5.8.1
  • First release: Feb 29, 2020
  • Latest release: Feb 19, 2021
  • Number of updates: 11
  • Update frequency: every 32.5 days
  • Top authors: avantman42 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 489 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Auto s2Member Affiliate
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0024.17 ▲1.46
Dashboard /wp-admin3.06 ▲0.0031.15 ▼5.37
Posts /wp-admin/edit.php3.12 ▲0.0131.81 ▲0.41
Add New Post /wp-admin/post-new.php5.43 ▼0.0167.56 ▼628.14
Media Library /wp-admin/upload.php3.01 ▲0.0023.91 ▼0.09
Auto s2Member Affiliate /wp-admin/options-general.php?page=autos2aff_config2.9818.65

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Auto s2Member Affiliate
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,671 ▲7015.94 ▲0.444.92 ▼0.1474.83 ▼4.05
Dashboard /wp-admin2,935 ▲366.13 ▼0.01115.29 ▼15.97166.28 ▼12.39
Posts /wp-admin/edit.php2,748 ▲263.22 ▲0.1068.56 ▲1.06144.94 ▲4.82
Add New Post /wp-admin/post-new.php3,746 ▼6118.82 ▲0.39407.94 ▼53.60170.07 ▲9.86
Media Library /wp-admin/upload.php1,757 ▲55.49 ▼0.07147.37 ▲8.60186.45 ▲1.08
Auto s2Member Affiliate /wp-admin/options-general.php?page=autos2aff_config1,0432.3853.74115.58

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
This plugin's uninstaller ran successfully

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 | 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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/auto-s2member-affiliate/auto-s2member-affiliate.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: affiliates manager, affiliate, membership, integration, affiliates...

auto-s2member-affiliate/auto-s2member-affiliate.php 92% from 13 tests

The main PHP script in "Auto s2Member Affiliate" version 1.3 is automatically included on every request by WordPress
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 238 characters long)

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
There were no executable files found in this plugin102 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12366102

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin