84% affiliatewp-order-details-for-affiliates

Code Review | AffiliateWP - Order Details For Affiliates

WordPress plugin AffiliateWP - Order Details For Affiliates scored84%from 54 tests.

About plugin

  • Plugin page: affiliatewp-order...
  • Plugin version: 1.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.0
  • WordPress version: 6.3.1
  • First release: Sep 16, 2014
  • Latest release: Jun 6, 2022
  • Number of updates: 28
  • Update frequency: every 100.7 days
  • Top authors: sumobi (46.43%)dbeja (25%)DrewAPicture (25%)tubiz (7.14%)paninapress (7.14%)

Code review

54 tests

User reviews

1 review

Install metrics

3,000+ active /21,780 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.66ms] Passed 4 tests

A check of server-side resources used by AffiliateWP - Order Details For Affiliates
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.50 ▼3.67
Dashboard /wp-admin3.36 ▲0.0645.00 ▼5.56
Posts /wp-admin/edit.php3.47 ▲0.1244.42 ▼0.82
Add New Post /wp-admin/post-new.php5.94 ▲0.0585.09 ▼4.59
Media Library /wp-admin/upload.php3.28 ▲0.0537.98 ▲1.42

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for AffiliateWP - Order Details For Affiliates
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲6813.22 ▼1.151.75 ▼0.0442.91 ▲0.47
Dashboard /wp-admin2,212 ▲245.84 ▲0.02102.65 ▼12.9239.14 ▼10.18
Posts /wp-admin/edit.php2,092 ▲32.04 ▲0.0537.26 ▲0.9233.34 ▼1.81
Add New Post /wp-admin/post-new.php1,536 ▲323.27 ▲0.20654.92 ▼31.9964.75 ▲13.56
Media Library /wp-admin/upload.php1,388 ▲34.13 ▼0.06113.77 ▲6.3646.79 ▲1.18

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/affiliatewp-order-details-for-affiliates/includes/class-admin.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/affiliatewp-order-details-for-affiliates/includes/class-shortcodes.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function affiliatewp_order_details_for_affiliates() in wp-content/plugins/affiliatewp-order-details-for-affiliates/templates/dashboard-tab-order-details.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

affiliatewp-order-details-for-affiliates/affiliatewp-order-details-for-affiliates.php Passed 13 tests

The principal PHP file in "AffiliateWP - Order Details For Affiliates" v. 1.3 is loaded by WordPress automatically on each request
73 characters long description:
Share customer purchase information with the affiliate who referred them.

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
There were no executable files found in this plugin1,562 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP124371,2941,301
PO File286101261

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity20.00
▷ Minimum class complexity5.00
▷ Maximum class complexity91.00
Average method complexity2.96
▷ Minimum method complexity1.00
▷ Maximum method complexity55.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes220.00%
▷ Concrete classes880.00%
▷ Final classes112.50%
Methods99
▷ Static methods11.01%
▷ Public methods5959.60%
▷ Protected methods2222.22%
▷ Private methods1818.18%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin