100% affiliate-bridge

Code Review | Affiliate Bridge

WordPress plugin Affiliate Bridge scored 100% from 53 tests.

About plugin

  • Plugin page: affiliate-bridge
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.7.1
  • WordPress version: 5.8.1
  • First release: Mar 30, 2021
  • Latest release: May 1, 2021
  • Number of updates: 6
  • Update frequency: every 6.5 days
  • Top authors: affiliatebridge (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 153 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.12MB] [CPU: ▼268.91ms] Passed 4 tests

This is a short check of server-side resources used by Affiliate Bridge
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.92 ▲0.2034.47 ▲14.83
Dashboard /wp-admin3.22 ▲0.1751.25 ▲9.61
Posts /wp-admin/edit.php3.28 ▲0.1750.98 ▲5.17
Add New Post /wp-admin/post-new.php5.51 ▲0.0894.55 ▼1,084.24
Media Library /wp-admin/upload.php3.09 ▲0.0831.51 ▼6.17
Affiliate Bridge /wp-admin/options-general.php?page=affiliate-bridge-backend3.1432.11

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Affiliate Bridge
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,875 ▲26917.47 ▲1.948.05 ▼2.0249.85 ▼2.62
Dashboard /wp-admin3,134 ▲2847.98 ▲2.16161.89 ▲28.83104.67 ▲0.90
Posts /wp-admin/edit.php2,947 ▲2414.27 ▲1.5882.60 ▲18.7391.55 ▲1.93
Add New Post /wp-admin/post-new.php1,858 ▲20519.12 ▲0.32341.40 ▼32.63119.02 ▲12.86
Media Library /wp-admin/upload.php1,732 ▼404.79 ▼0.20127.12 ▼33.10107.60 ▼3.76
Affiliate Bridge /wp-admin/options-general.php?page=affiliate-bridge-backend1,5943.4771.5494.84

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

Smoke tests Passed 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)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
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
3 plugin tags: bridge, affiliate, ebay

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

The primary PHP file in "Affiliate Bridge" version 1.0.2 is used by WordPress to initiate all plugin functionality
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 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin857 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP7132145748
Markdown132071
CSS13022
JavaScript10616

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity94.00
▷ Minimum class complexity94.00
▷ Maximum class complexity94.00
Average method complexity4.88
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods1041.67%
▷ Protected methods00.00%
▷ Private methods1458.33%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 1 test

Image compression Passed 1 test

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.22MB with 0.15MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/screenshot-1.png87.67KB33.60KB▼ 61.67%
assets/images/screenshot-2.png140.40KB41.77KB▼ 70.25%