84% affiliates-manager-s2member-integration

Code Review | Affiliates Manager S2Member Integration

WordPress plugin Affiliates Manager S2Member Integration scored84%from 54 tests.

About plugin

  • Plugin page: affiliates-manage...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.0
  • WordPress version: 6.3.1
  • First release: Dec 31, 2014
  • Latest release: Aug 28, 2022
  • Number of updates: 8
  • Update frequency: every 349.7 days
  • Top authors: affmngr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /4,607 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

This is a short check of server-side resources used by Affiliates Manager S2Member Integration
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.45 ▼4.08
Dashboard /wp-admin3.31 ▲0.0143.93 ▼5.51
Posts /wp-admin/edit.php3.36 ▲0.0145.53 ▲1.68
Add New Post /wp-admin/post-new.php5.89 ▲0.0183.07 ▼4.65
Media Library /wp-admin/upload.php3.24 ▲0.0133.70 ▲0.71

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Affiliates Manager S2Member Integration
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.28 ▼1.124.72 ▲2.6141.18 ▼11.95
Dashboard /wp-admin2,206 ▲185.77 ▼0.11104.39 ▲2.4638.63 ▼3.09
Posts /wp-admin/edit.php2,089 ▼02.03 ▼0.0140.45 ▲1.7334.22 ▼3.26
Add New Post /wp-admin/post-new.php1,514 ▼1917.67 ▼5.39616.02 ▼52.3749.69 ▼3.83
Media Library /wp-admin/upload.php1,385 ▼64.21 ▼0.0294.72 ▼11.2142.94 ▼3.25

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

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
Everything seems fine, however 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/affiliates-manager-s2member-integration/affiliatemgr-s2member-integration.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

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
7 plugin tags: s2 member, users, membership, affiliate, integration...

affiliates-manager-s2member-integration/affiliatemgr-s2member-integration.php 92% from 13 tests

This is the main PHP file of "Affiliates Manager S2Member Integration" version 1.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("affiliates-manager-s2member-integration.php" instead of "affiliatemgr-s2member-integration.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin45 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16845

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected