83% affiliatewp-affiliate-area-tabs

Code Review | AffiliateWP - Affiliate Area Tabs

WordPress plugin AffiliateWP - Affiliate Area Tabs scored83%from 54 tests.

About plugin

  • Plugin page: affiliatewp-affil...
  • Plugin version: 1.4.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.4.1
  • WordPress version: 6.3.1
  • First release: Apr 26, 2016
  • Latest release: Nov 17, 2023
  • Number of updates: 35
  • Update frequency: every 78.9 days
  • Top authors: sumobi (62.86%)dbeja (14.29%)DrewAPicture (11.43%)aubreypwd (8.57%)tubiz (8.57%)

Code review

54 tests

User reviews

1 review

Install metrics

6,000+ active /55,547 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼6.33ms] Passed 4 tests

An overview of server-side resources used by AffiliateWP - Affiliate Area Tabs
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0537.72 ▼3.91
Dashboard /wp-admin3.36 ▲0.0646.05 ▼7.57
Posts /wp-admin/edit.php3.47 ▲0.1247.16 ▲0.50
Add New Post /wp-admin/post-new.php5.94 ▲0.0583.20 ▼14.00
Media Library /wp-admin/upload.php3.28 ▲0.0535.22 ▲0.15

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by AffiliateWP - Affiliate Area Tabs
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3114.23 ▼0.111.69 ▼0.1042.61 ▼1.68
Dashboard /wp-admin2,201 ▲215.56 ▼0.0989.79 ▼11.2840.49 ▼5.87
Posts /wp-admin/edit.php2,103 ▲32.01 ▲0.0040.38 ▲3.4036.28 ▼1.92
Add New Post /wp-admin/post-new.php1,529 ▲323.42 ▲0.10692.72 ▲31.5651.91 ▼1.80
Media Library /wp-admin/upload.php1,406 ▲94.21 ▲0.0399.42 ▼6.9043.16 ▼1.24

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/affiliatewp-affiliate-area-tabs/includes/class-admin.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/affiliatewp-affiliate-area-tabs/includes/class-compatibility.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/affiliatewp-affiliate-area-tabs/includes/class-upgrades.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (16 tag instead of maximum 10)
The official readme.txt is a good inspiration

affiliatewp-affiliate-area-tabs/affiliatewp-affiliate-area-tabs.php 85% from 13 tests

The main PHP script in "AffiliateWP - Affiliate Area Tabs" version 1.4.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")
  • Domain Path: Use only dashes and lowercase characters for the domain path ("languages")

Code Analysis Passed 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
No dangerous file extensions were detected4,636 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
JSON2003,011
PHP115151,4691,243
JavaScript39735223
CSS20083
LESS120076

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity18.00
▷ Minimum class complexity5.00
▷ Maximum class complexity40.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes220.00%
▷ Concrete classes880.00%
▷ Final classes112.50%
Methods113
▷ Static methods21.77%
▷ Public methods7162.83%
▷ Protected methods2219.47%
▷ Private methods2017.70%
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

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected