84% goaffpro

Code Review | Goaffpro Affiliate Marketing

WordPress plugin Goaffpro Affiliate Marketing scored84%from 54 tests.

About plugin

  • Plugin page: goaffpro
  • Plugin version: 2.7.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.4.1
  • WordPress version: 6.3.1
  • First release: Dec 11, 2020
  • Latest release: Nov 21, 2023
  • Number of updates: 24
  • Update frequency: every 44.8 days
  • Top authors: goaffpro (100%)

Code review

54 tests

User reviews

29 reviews

Install metrics

5,000+ active /41,667 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.05MB] [CPU: ▼0.76ms] Passed 4 tests

Server-side resources used by Goaffpro Affiliate Marketing
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0540.94 ▲0.38
Dashboard /wp-admin3.36 ▲0.0548.50 ▼4.70
Posts /wp-admin/edit.php3.41 ▲0.0549.01 ▲2.03
Add New Post /wp-admin/post-new.php5.94 ▲0.0594.41 ▲8.65
Media Library /wp-admin/upload.php3.28 ▲0.0535.59 ▼0.74

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
goaffpro_public_token
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Goaffpro Affiliate Marketing
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲5514.24 ▼0.491.88 ▲0.0141.90 ▼2.44
Dashboard /wp-admin2,198 ▲245.64 ▼0.0296.46 ▼2.4343.19 ▼4.66
Posts /wp-admin/edit.php2,100 ▼01.94 ▲0.0039.52 ▲0.6836.05 ▲3.02
Add New Post /wp-admin/post-new.php1,526 ▼223.14 ▼0.06591.96 ▼56.4156.89 ▼0.07
Media Library /wp-admin/upload.php1,394 ▼94.20 ▼0.0397.19 ▼4.1543.68 ▲0.27

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

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 fix the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/goaffpro/goaffpro.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/goaffpro/uninstall.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Contributors: Plugin contributors field is missing
The official readme.txt is a good inspiration

goaffpro/goaffpro.php 92% from 13 tests

"Goaffpro Affiliate Marketing" version 2.7.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 173 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin234 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP33370234

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! 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%
Functions13
▷ Named functions1292.31%
▷ Anonymous functions17.69%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin