73% shopper

Code Review | Shopper - Affiliate Link Management, 25000+ Brand Partnerships & Creative Product Displays

WordPress plugin Shopper - Affiliate Link Management, 25000+ Brand Partnerships & Creative Product Displays scored73%from 54 tests.

About plugin

  • Plugin page: shopper
  • Plugin version: 3.2.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.4.1
  • WordPress version: 6.3.1
  • First release: Jun 14, 2022
  • Latest release: Nov 30, 2023
  • Number of updates: 89
  • Update frequency: every 6.1 days
  • Top authors: shopperdotcom (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,798 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.37MB] [CPU: ▲13.31ms] Passed 4 tests

A check of server-side resources used by Shopper - Affiliate Link Management, 25000+ Brand Partnerships & Creative Product Displays
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3652.39 ▲11.26
Dashboard /wp-admin3.67 ▲0.3661.46 ▲12.60
Posts /wp-admin/edit.php3.76 ▲0.4164.33 ▲18.62
Add New Post /wp-admin/post-new.php6.28 ▲0.40100.17 ▲10.76
Media Library /wp-admin/upload.php3.59 ▲0.3652.55 ▲21.03

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 54 new files
Database: 7 new tables, 7 new options
New tables
wp_shopper_dot_com_global_settings
wp_shopper_dot_com_collection_products
wp_shopper_dot_com_auth
wp_shopper_dot_com_store
wp_shopper_dot_com_themes
wp_shopper_dot_com_aff_slugs
wp_shopper_dot_com_all_collections
New WordPress options
shopper_dotcom_db_version
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Shopper - Affiliate Link Management, 25000+ Brand Partnerships & Creative Product Displays: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,924 ▲16213.88 ▼0.837.07 ▲5.3737.71 ▼7.54
Dashboard /wp-admin2,245 ▲685.81 ▲0.1699.40 ▲1.2442.38 ▼2.32
Posts /wp-admin/edit.php2,152 ▲522.27 ▲0.2443.98 ▲0.4637.20 ▼7.61
Add New Post /wp-admin/post-new.php6,214 ▲4,68819.19 ▼4.55858.22 ▲255.5856.56 ▼1.49
Media Library /wp-admin/upload.php1,453 ▲564.33 ▲0.13103.96 ▲6.3942.16 ▲1.26

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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 take a closer look at the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_query_var() in wp-content/plugins/shopper/templates/template-aff-rdrctn.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/shopper/templates/template-store.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/shopper/index.php:10

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 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
9 plugin tags: link tracking, wordpress affiliate plugin, affiliate plugin, affiliate marketing, affiliate link management...

shopper/index.php 77% from 13 tests

This is the main PHP file of "Shopper - Affiliate Link Management, 25000+ Brand Partnerships & Creative Product Displays" version 3.2.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 180 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("shopper.php" instead of "index.php")
  • Plugin Name: Keep the plugin name shorter than 70 characters (currently 91 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected20,578 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1727620312,244
CSS91,1171635,764
PHP7136922,385
SVG1110168
JSON10017

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
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%
Functions43
▷ Named functions3376.74%
▷ Anonymous functions1023.26%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.23MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/help-round-button.png1.53KB0.83KB▼ 46.05%
assets/home_page_iframe.png151.04KB49.42KB▼ 67.28%
(invalid) assets/close_button.png66.28KB0.00KB▼ 100.00%
assets/icon-256x256.png13.24KB4.37KB▼ 67.02%
assets/sync-icon.png2.11KB1.76KB▼ 16.77%