79% affiliate-bridge

Code Review | Affiliate Bridge

WordPress plugin Affiliate Bridge scored79%from 54 tests.

About plugin

  • Plugin page: affiliate-bridge
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.7.1
  • WordPress version: 6.3.1
  • First release: Mar 30, 2021
  • Latest release: Dec 14, 2021
  • Number of updates: 8
  • Update frequency: every 33.3 days
  • Top authors: affiliatebridge (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /524 total downloads


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.76MB] [CPU: ▲10.31ms] Passed 4 tests

This is a short check of server-side resources used by Affiliate Bridge
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.19 ▲0.7348.94 ▲10.11
Dashboard /wp-admin4.07 ▲0.7668.34 ▲16.45
Posts /wp-admin/edit.php4.18 ▲0.8262.81 ▲14.49
Add New Post /wp-admin/post-new.php6.67 ▲0.7899.72 ▲0.20
Media Library /wp-admin/upload.php3.99 ▲0.7658.03 ▲23.25
Sources /wp-admin/admin.php?page=affiliate-bridge-sources3.9656.45
Settings /wp-admin/admin.php?page=affiliate-bridge-backend3.9645.86
Shortcode Generator /wp-admin/admin.php?page=affiliate-bridge-shortcode3.9350.14

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 43 new files
Database: 3 new tables, 7 new options
New tables
New WordPress options

Browser metrics Passed 4 tests

Affiliate Bridge: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲6714.39 ▲0.101.69 ▲0.0143.50 ▲2.88
Dashboard /wp-admin2,235 ▲615.62 ▲0.1096.20 ▼4.2643.50 ▼0.22
Posts /wp-admin/edit.php2,137 ▲372.03 ▼0.0037.20 ▲2.1433.47 ▼3.39
Add New Post /wp-admin/post-new.php1,557 ▲2823.16 ▲0.11649.12 ▼33.5155.92 ▲6.90
Media Library /wp-admin/upload.php1,440 ▲404.33 ▲0.1393.26 ▼11.9543.45 ▼1.54
Sources /wp-admin/admin.php?page=affiliate-bridge-sources9471.6929.0924.03
Settings /wp-admin/admin.php?page=affiliate-bridge-backend9381.8322.7530.09
Shortcode Generator /wp-admin/admin.php?page=affiliate-bridge-shortcode9851.8026.5234.98

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=affiliate-bridge-shortcode
    • > Notice in wp-content/plugins/affiliate-bridge/includes/sources/ebay/source.php+313
    Trying to access array offset on value of type null

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_basename() in wp-content/plugins/affiliate-bridge/config.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: bridge, affiliate, ebay

affiliate-bridge/affiliate-bridge.php Passed 13 tests

The main PHP file in "Affiliate Bridge" ver. 1.1.0 adds more information about the plugin and also serves as the entry point for this plugin
67 characters long description:
Easily add product images from affiliate programs using shortcodes.

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
Success! There were no dangerous files found in this plugin4,387 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An overview of 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.33
Average class complexity18.73
▷ Minimum class complexity1.00
▷ Maximum class complexity124.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
▷ Abstract classes27.69%
▷ Concrete classes2492.31%
▷ Final classes00.00%
▷ Static methods6020.83%
▷ Public methods16858.33%
▷ Protected methods248.33%
▷ Private methods9633.33%
▷ Named functions00.00%
▷ Anonymous functions2100.00%
▷ Global constants1422.22%
▷ Class constants4977.78%
▷ Public constants49100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.34MB with 0.17MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/screenshot-2.png140.40KB41.77KB▼ 70.25%
assets/images/aliexpress.png30.56KB10.05KB▼ 67.11%
assets/images/screenshot-1.png87.67KB33.60KB▼ 61.67%