84% easy-affiliate-products

Code Review | Easy Affiliate Products

WordPress plugin Easy Affiliate Products scored84%from 54 tests.

About plugin

  • Plugin page: easy-affiliate-pr...
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.2.3
  • WordPress version: 6.3.1
  • First release: Sep 18, 2019
  • Latest release: Oct 22, 2020
  • Number of updates: 21
  • Update frequency: every 19.1 days
  • Top authors: francescosganga (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /842 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼1.98ms] Passed 4 tests

This is a short check of server-side resources used by Easy Affiliate Products
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0840.70 ▼0.97
Dashboard /wp-admin3.40 ▲0.1042.74 ▼8.72
Posts /wp-admin/edit.php3.52 ▲0.1645.46 ▼1.67
Add New Post /wp-admin/post-new.php5.98 ▲0.1095.59 ▲3.45
Media Library /wp-admin/upload.php3.33 ▲0.1037.21 ▲5.47
Easy Affiliate Products /wp-admin/admin.php?page=eap-options3.3034.25
About /wp-admin/admin.php?page=eap-option-about3.2930.22

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Easy Affiliate Products
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲9313.18 ▼1.171.59 ▼0.1539.60 ▼6.15
Dashboard /wp-admin2,235 ▲475.85 ▲0.9498.17 ▼16.4477.88 ▲34.15
Posts /wp-admin/edit.php2,115 ▲232.00 ▼0.0539.53 ▲1.0234.72 ▼1.78
Add New Post /wp-admin/post-new.php1,540 ▲1223.23 ▲4.85693.29 ▲48.8070.70 ▲4.33
Media Library /wp-admin/upload.php1,411 ▲234.18 ▲0.0099.20 ▲5.9373.09 ▲33.72
Easy Affiliate Products /wp-admin/admin.php?page=eap-options1,0582.0824.3529.52
About /wp-admin/admin.php?page=eap-option-about7912.0123.3926.76

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

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 | 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 trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/easy-affiliate-products/easy-affiliate-products.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: products, 90, shortcake, cookie, add to cart...

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

Analyzing the main PHP file in "Easy Affiliate Products" version 1.1.0
32 characters long description:
Add Amazon Products in your blog

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin648 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP27316491
CSS1290152
JavaScript1005

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.18
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods952.94%
▷ Protected methods00.00%
▷ Private methods847.06%
Functions13
▷ Named functions13100.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
3 PNG files occupy 0.33MB with 0.22MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/example02.png170.39KB45.75KB▼ 73.15%
assets/icon.png0.63KB0.35KB▼ 44.68%
assets/example01.png165.30KB33.94KB▼ 79.47%