62% magforest-affiliate-magazine-reseller-system

Code Review | Magforest Affiliate Plugin

WordPress plugin Magforest Affiliate Plugin scored 62% from 54 tests.

About plugin

  • Plugin page: magforest-affilia...
  • Plugin version: 2.2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7.1
  • WordPress version: 6.3.1
  • First release: Mar 27, 2017
  • Latest release: May 6, 2021
  • Number of updates: 64
  • Update frequency: every 23.6 days
  • Top authors: magforest (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 11,449 total downloads

Benchmarks

Plugin footprint 65% 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.63MB] [CPU: ▼33.22ms] Passed 4 tests

A check of server-side resources used by Magforest Affiliate Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0839.77 ▼8.71
Dashboard /wp-admin3.32 ▲0.0128.27 ▼23.95
Posts /wp-admin/edit.php3.32 ▼0.0428.77 ▼21.62
Add New Post /wp-admin/post-new.php3.32 ▼2.5725.91 ▼74.68
Media Library /wp-admin/upload.php3.32 ▲0.0924.73 ▼12.63
Auto Sync /wp-admin/admin.php?page=magforest_schedule3.3226.90
Bulk Import /wp-admin/admin.php?page=magforest_bulk3.3224.34
Settings /wp-admin/admin.php?page=magforest_setup3.3227.32
Search /wp-admin/admin.php?page=magforest3.3225.15

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 24 new files
Database: no new tables, 8 new options
New WordPress options
magforest_true_sync_interval
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
magforest_template

Browser metrics Passed 4 tests

An overview of browser requirements for Magforest Affiliate Plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,866 ▲13113.28 ▼1.495.18 ▲3.0338.01 ▼6.63
Dashboard /wp-admin2,275 ▲874.89 ▲0.02111.29 ▼3.9542.86 ▼3.30
Posts /wp-admin/edit.php2,155 ▲662.03 ▲0.0240.39 ▲2.9735.79 ▲3.16
Add New Post /wp-admin/post-new.php1,585 ▲7118.34 ▲0.79587.87 ▼71.5948.72 ▼7.05
Media Library /wp-admin/upload.php1,454 ▲634.23 ▼0.0198.05 ▲2.5541.92 ▼1.96
Auto Sync /wp-admin/admin.php?page=magforest_schedule1,2132.0726.7341.51
Bulk Import /wp-admin/admin.php?page=magforest_bulk1,0402.0423.6033.06
Settings /wp-admin/admin.php?page=magforest_setup1,1132.1826.7538.26
Search /wp-admin/admin.php?page=magforest1,0842.1825.9725.49

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/magforest-affiliate-magazine-reseller-system/admin/panel.php+65
    Undefined index: action
  • Zombie WordPress options detected upon uninstall: 8 options
    • magforest_template
    • can_compress_scripts
    • theysaidso_admin_options
    • magforest_true_sync_interval
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 24 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=magforest
    • > Notice in wp-content/plugins/magforest-affiliate-magazine-reseller-system/admin/panel.php+75
    Undefined index: action
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=magforest_bulk
    • > Notice in wp-content/plugins/magforest-affiliate-magazine-reseller-system/etc/magforest_api.php+137
    Trying to get property 'categories' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=magforest_bulk
    • > Notice in wp-content/plugins/magforest-affiliate-magazine-reseller-system/etc/magforest_api.php+119
    Trying to get property 'publishers' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=magforest_bulk
    • > Notice in wp-content/plugins/magforest-affiliate-magazine-reseller-system/etc/magforest_api.php+101
    Trying to get property 'tags' of non-object
    • > GET request to /wp-admin/admin.php?page=magforest
    • > Notice in wp-content/plugins/magforest-affiliate-magazine-reseller-system/admin/pages/browse.php+59
    Undefined index: mag_search
    • > GET request to /wp-admin/admin.php?page=magforest
    • > Notice in wp-content/plugins/magforest-affiliate-magazine-reseller-system/etc/magforest_api.php+71
    Trying to get property 'count' of non-object
    • > GET request to /wp-admin/admin.php?page=magforest
    • > Notice in wp-content/plugins/magforest-affiliate-magazine-reseller-system/etc/magforest_api.php+67
    Trying to get property 'products' of non-object

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 14× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/magforest-affiliate-magazine-reseller-system/frontend/affiliate_post.php
    • > /wp-content/plugins/magforest-affiliate-magazine-reseller-system/admin/pages/bulk.php
    • > /wp-content/plugins/magforest-affiliate-magazine-reseller-system/admin/panel.php
    • > /wp-content/plugins/magforest-affiliate-magazine-reseller-system/admin/pages/importer.php
    • > /wp-content/plugins/magforest-affiliate-magazine-reseller-system/admin/install.php
    • > /wp-content/plugins/magforest-affiliate-magazine-reseller-system/admin/warnings.php
    • > /wp-content/plugins/magforest-affiliate-magazine-reseller-system/etc/settings.php
    • > /wp-content/plugins/magforest-affiliate-magazine-reseller-system/admin/pages/settings.php
    • > /wp-content/plugins/magforest-affiliate-magazine-reseller-system/etc/magforest_api.php
    • > /wp-content/plugins/magforest-affiliate-magazine-reseller-system/frontend/shortcode.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/magforest-affiliate-magazine-reseller-system/admin/magazine.table.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/magforest-affiliate-magazine-reseller-system/admin/cron.table.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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
Attributes that require attention: The official readme.txt might help

magforest-affiliate-magazine-reseller-system/magforest-affiliate.php 92% from 13 tests

The main PHP file in "Magforest Affiliate Plugin" ver. 2.2.4 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("magforest-affiliate-magazine-reseller-system.php" instead of "magforest-affiliate.php")

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 plugin2,265 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP175167392,264
JavaScript1141

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity47.33
▷ Minimum class complexity4.00
▷ Maximum class complexity125.00
Average method complexity2.90
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods73
▷ Static methods45.48%
▷ Public methods5068.49%
▷ Protected methods2128.77%
▷ Private methods22.74%
Functions70
▷ Named functions70100.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
4 compressed PNG files occupy 0.04MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/orderprintedbutton.png10.79KB11.24KB0.00%
assets/download-now-button.png11.70KB11.73KB0.00%
assets/magforestlogo2016.png3.99KB4.24KB0.00%
assets/orderprintedbuttonOLD.png14.85KB5.95KB▼ 59.91%