10% affiliate-window-banners

Code Review | Affiliate Window Banners

WordPress plugin Affiliate Window Banners scored10%from 54 tests.

About plugin

  • Plugin page: affiliate-window-...
  • Plugin version: 2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.9
  • WordPress version: 6.3.1
  • First release: Dec 1, 2012
  • Latest release: Apr 24, 2014
  • Number of updates: 25
  • Update frequency: every 20.4 days
  • Top authors: ypraise (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,585 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • Install procedure had errors
    • > Parse error in wp-content/plugins/affiliate-window-banners/affwinbanners.php+220
    syntax error, unexpected '}', expecting end of file

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.23ms] Passed 4 tests

This is a short check of server-side resources used by Affiliate Window Banners
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0045.91 ▲2.58
Dashboard /wp-admin3.31 ▲0.0046.61 ▼4.01
Posts /wp-admin/edit.php3.44 ▲0.0875.88 ▲28.19
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.95 ▼9.56
Media Library /wp-admin/upload.php3.23 ▲0.0036.95 ▼5.94

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Affiliate Window Banners
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.76 ▲0.472.19 ▲0.5242.90 ▼11.63
Dashboard /wp-admin2,206 ▲185.90 ▲1.01109.65 ▲1.7141.26 ▲1.82
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0540.02 ▲4.4136.71 ▲3.88
Add New Post /wp-admin/post-new.php1,533 ▼023.37 ▲0.34727.55 ▲51.7863.30 ▲12.35
Media Library /wp-admin/upload.php1,388 ▼04.22 ▼0.0794.85 ▼7.0142.05 ▼2.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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/affiliate-window-banners/classes/class.cache.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'SoapClient' not found in wp-content/plugins/affiliate-window-banners/classes/class.php5Client.php:30
    • > PHP Parse error
      syntax error, unexpected '}', expecting end of file in wp-content/plugins/affiliate-window-banners/affwinbanners.php on line 220

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (The basic layout of the product feed to the sidebar. Styling can be done using css.), #2 (The Affiliate Window Banners admin page.)
  • Contributors: Contributors not specified
The official readme.txt is a good inspiration

affiliate-window-banners/affwinbanners.php 85% from 13 tests

"Affiliate Window Banners" version 2.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 277 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("affiliate-window-banners.php" instead of "affwinbanners.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin328 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP5115195328

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity4.00
▷ Minimum class complexity3.00
▷ Maximum class complexity5.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods6
▷ Static methods233.33%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.36MB with 0.23MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png127.45KB45.78KB▼ 64.08%
screenshot-1.png241.54KB84.54KB▼ 65.00%