84% affilinet-product-widgets

Code Review | affilinet Product Widgets

WordPress plugin affilinet Product Widgets scored84%from 54 tests.

About plugin

  • Plugin page: affilinet-product...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.4
  • WordPress version: 6.3.1
  • First release: Feb 21, 2018
  • Latest release: Mar 6, 2018
  • Number of updates: 8
  • Update frequency: every 1.8 days
  • Top authors: Affilinet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,285 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼7.20ms] Passed 4 tests

Analyzing server-side resources used by affilinet Product Widgets
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1046.06 ▲2.14
Dashboard /wp-admin3.40 ▲0.0948.18 ▼6.80
Posts /wp-admin/edit.php3.51 ▲0.1546.45 ▼3.27
Add New Post /wp-admin/post-new.php5.52 ▼0.3669.84 ▼20.87
Media Library /wp-admin/upload.php3.32 ▲0.0936.83 ▲3.72
affilinet Widgets /wp-admin/options-general.php?page=affilinet-product-widgets-settings3.3031.63

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 8 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by affilinet Product Widgets
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲8913.21 ▼1.164.30 ▲2.4142.09 ▼11.53
Dashboard /wp-admin2,230 ▲395.80 ▼0.0996.31 ▼24.9239.28 ▼7.34
Posts /wp-admin/edit.php2,116 ▲272.02 ▲0.0239.55 ▲3.6940.76 ▲3.47
Add New Post /wp-admin/post-new.php155 ▼1,3591.73 ▼15.9518.32 ▼655.169.84 ▼54.78
Media Library /wp-admin/upload.php1,412 ▲274.19 ▼0.04105.22 ▲6.3746.15 ▲2.70
affilinet Widgets /wp-admin/options-general.php?page=affilinet-product-widgets-settings9032.0627.2135.03

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 were found after uninstall: 8 options
    • db_upgraded
    • can_compress_scripts
    • widget_affilinetwidgetswidget
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • recovery_mode_email_last_sent
    • widget_recent-posts

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/affilinet-product-widgets/views/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/affilinet-product-widgets/classes/AffilinetWidgetsWidget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/affilinet-product-widgets/affilinet-product-widgets.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test


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
5 plugin tags: advertising, widgets, affilinet, affiliate, banner

affilinet-product-widgets/affilinet-product-widgets.php Passed 13 tests

This is the main PHP file of "affilinet Product Widgets" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
108 characters long description:
The plugin allows you simple integration of affilinet Product Widgets into your WordPress posts and sidebar.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected879 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PO File5120115345

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity5.80
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
▷ Static methods520.83%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions1100.00%
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/affilinet_signet_small.png5.63KB2.62KB▼ 53.55%
images/dummy.png18.00KB6.94KB▼ 61.44%
images/affilinet_logo.png4.25KB1.85KB▼ 56.37%
images/affilinet_signet.png12.96KB6.80KB▼ 47.52%