78% quick-affiliate-store

Code Review | Quick Affiliate Store

WordPress plugin Quick Affiliate Store scored 78% from 54 tests.

About plugin

  • Plugin page: quick-affiliate-s...
  • Plugin version: 0.5.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.1
  • WordPress version: 5.9.2
  • First release: Feb 6, 2019
  • Latest release: Mar 2, 2019
  • Number of updates: 4
  • Update frequency: every 8.5 days
  • Top authors: sangaran (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 491 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲3.69MB] [CPU: ▼292.31ms] Passed 4 tests

Server-side resources used by Quick Affiliate Store
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /7.53 ▲4.0178.04 ▲23.74
Dashboard /wp-admin7.55 ▲4.1453.21 ▲15.60
Posts /wp-admin/edit.php7.55 ▲3.9162.28 ▲22.38
Add New Post /wp-admin/post-new.php9.69 ▲2.71125.71 ▼1,218.70
Media Library /wp-admin/upload.php7.55 ▲4.2544.53 ▲11.49
Quick Affiliate Store /wp-admin/options-general.php?page=quick_affiliate_store7.5545.44
Freemius Debug [v.2.2.4] /wp-admin/admin.php?page=freemius7.5540.15

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 213 new files
Database: no new tables, 5 new options
New WordPress options
fs_gdpr
fs_api_cache
fs_debug_mode
fs_active_plugins
fs_accounts

Browser metrics Passed 4 tests

Quick Affiliate Store: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,837 ▲8315.66 ▼0.046.49 ▼0.013.19 ▲0.28
Dashboard /wp-admin2,928 ▲746.14 ▼0.04117.00 ▼20.19174.25 ▲6.77
Posts /wp-admin/edit.php2,724 ▲333.23 ▼0.0270.69 ▲4.02161.47 ▲19.82
Add New Post /wp-admin/post-new.php1,771 ▲5516.99 ▼3.93433.73 ▼57.20166.23 ▲18.21
Media Library /wp-admin/upload.php1,734 ▲365.52 ▼0.00162.06 ▲18.53201.22 ▼31.32
Quick Affiliate Store /wp-admin/options-general.php?page=quick_affiliate_store1,2522.4555.45216.45
Freemius Debug [v.2.2.4] /wp-admin/admin.php?page=freemius1,4482.5455.65130.76

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 5 options in the database
    • fs_accounts
    • fs_gdpr
    • fs_debug_mode
    • fs_active_plugins
    • fs_api_cache

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/quick-affiliate-store/freemius/templates/ajax-loader.php
  • 12× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/quick-affiliate-store/freemius/templates/account/partials/addon.php on line 7
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/quick-affiliate-store/public/partials/quick-affiliate-store-products-grid.php on line 1
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/quick-affiliate-store/freemius/templates/account/partials/addon.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/quick-affiliate-store/freemius/templates/account/partials/addon.php:9
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/quick-affiliate-store/freemius/templates/account/partials/addon.php on line 6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/quick-affiliate-store/freemius/templates/account/partials/addon.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freemius() in wp-content/plugins/quick-affiliate-store/freemius/templates/partials/network-activation.php:6
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/quick-affiliate-store/freemius/templates/account/partials/addon.php on line 8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/quick-affiliate-store/freemius/templates/account/partials/addon.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/quick-affiliate-store/public/partials/quick-affiliate-store-products-grid.php:27

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: amazon affiliate, store, affiliate, affiliate marketing, amazon...

quick-affiliate-store/quick-affiliate-store.php Passed 13 tests

"Quick Affiliate Store" version 0.5.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
76 characters long description:
Monetize your Wordpress site with affiliate marketing. Supports Amazon feed.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin41,623 lines of code in 165 files:
LanguageFilesBlank linesComment linesLines of code
PHP1116,34514,58326,610
PO File115,5536,67012,029
Sass28399772,515
JavaScript33459194
Markdown1610192
CSS1112083

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 2,360)
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity69.63
▷ Minimum class complexity1.00
▷ Maximum class complexity2,360.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity83.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes49
▷ Abstract classes36.12%
▷ Concrete classes4693.88%
▷ Final classes00.00%
Methods1,069
▷ Static methods16615.53%
▷ Public methods74669.78%
▷ Protected methods181.68%
▷ Private methods30528.53%
Functions92
▷ Named functions92100.00%
▷ Anonymous functions00.00%
Constants116
▷ Global constants9682.76%
▷ Class constants2017.24%
▷ Public constants20100.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
4 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/quick-affiliate-store.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
public/img/no-image.png25.42KB12.61KB▼ 50.40%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%