10% easy-affiliate-store

Code Review | Easy Affiliate Store

WordPress plugin Easy Affiliate Store scored10%from 54 tests.

About plugin

  • Plugin page: easy-affiliate-store
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.9
  • WordPress version: 6.3.1
  • First release: May 2, 2014
  • Latest release: Jul 28, 2014
  • Number of updates: 13
  • Update frequency: every 6.7 days
  • Top authors: danmossop (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,942 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/easy-affiliate-store/easy-affiliate-store.php+65
    Function create_function() is deprecated

Server metrics [RAM: ▼1.94MB] [CPU: ▼51.49ms] Passed 4 tests

Analyzing server-side resources used by Easy Affiliate Store
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.413.84 ▼35.95
Dashboard /wp-admin2.07 ▼1.244.98 ▼47.53
Posts /wp-admin/edit.php2.07 ▼1.296.97 ▼40.82
Add New Post /wp-admin/post-new.php2.07 ▼3.825.51 ▼81.65
Media Library /wp-admin/upload.php2.07 ▼1.164.31 ▼31.27
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=doweas_product2.076.10
Products /wp-admin/edit.php?post_type=doweas_product2.075.79
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=doweas_product2.075.63
Departments /wp-admin/edit-tags.php?taxonomy=department&post_type=doweas_product2.075.54
Easy Affiliate Store /wp-admin/options-general.php?page=doweas_settings2.075.64
Add New /wp-admin/post-new.php?post_type=doweas_product2.075.38

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 8 new options
New WordPress options
category_children
widget_doweas_productdetailswidget
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Easy Affiliate Store
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲14113.28 ▼1.035.75 ▲3.7741.17 ▼7.34
Dashboard /wp-admin2,251 ▲604.85 ▼0.20104.24 ▼3.5140.45 ▼1.48
Posts /wp-admin/edit.php2,134 ▲422.02 ▼0.0336.10 ▼6.0537.97 ▲2.28
Add New Post /wp-admin/post-new.php1,583 ▲4618.45 ▲0.39611.49 ▼6.0387.94 ▲19.03
Media Library /wp-admin/upload.php1,436 ▲514.28 ▲0.0997.03 ▼2.8142.29 ▼0.50
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=doweas_product1,4882.1436.2139.96
Products /wp-admin/edit.php?post_type=doweas_product1,1501.9330.7227.93
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=doweas_product1,3492.2628.0229.80
Departments /wp-admin/edit-tags.php?taxonomy=department&post_type=doweas_product1,2972.1427.8131.39
Easy Affiliate Store /wp-admin/options-general.php?page=doweas_settings8422.0425.5226.23
Add New /wp-admin/post-new.php?post_type=doweas_product2,6297.89170.4964.91

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/easy-affiliate-store/easy-affiliate-store.php+65
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 8 options
    • category_children
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_doweas_productdetailswidget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=doweas_product
    • > Deprecated in wp-content/plugins/easy-affiliate-store/easy-affiliate-store.php+65
    Function create_function() is deprecated
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=doweas_product
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in doweas_productDetailsWidget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/post-new.php?post_type=doweas_product
    • > Notice in wp-content/plugins/easy-affiliate-store/easy-affiliate-store.php+184
    Undefined index: doweas_product_details_nonce

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 take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/easy-affiliate-store/easy-affiliate-store.php:16

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Donate link: Invalid URI found ("")
  • Screenshots: A description for screenshot #3 is missing in easy-affiliate-store/assets to your readme.txt
You can look at the official readme.txt

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

The main PHP file in "Easy Affiliate Store" ver. 1.1.2 adds more information about the plugin and also serves as the entry point for this plugin
90 characters long description:
Add an affiliate store section to any blog, allowing easy promotion of affiliate products.

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 plugin423 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP19066423

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions24
▷ Named functions24100.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
There were not PNG files found in your plugin