89% osi-affiliate

Code Review | OSI Affiliate

WordPress plugin OSI Affiliate scored89%from 54 tests.

About plugin

  • Plugin page: osi-affiliate
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.3.2
  • WordPress version: 6.3.1
  • First release: Jun 22, 2017
  • Latest release: Jan 21, 2020
  • Number of updates: 10
  • Update frequency: every 95.1 days
  • Top authors: osiaffiliate (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,055 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.94ms] Passed 4 tests

This is a short check of server-side resources used by OSI Affiliate
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.69 ▲0.71
Dashboard /wp-admin3.31 ▲0.0148.67 ▼3.12
Posts /wp-admin/edit.php3.36 ▲0.0149.71 ▲3.52
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.01 ▼20.86
Media Library /wp-admin/upload.php3.23 ▲0.0140.35 ▲4.11

Server storage [IO: ▲0.51MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 34 new files
Database: 1 new table, 7 new options
New tables
wp_osi_hss_short_code
New WordPress options
osi_hss_limit
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

OSI Affiliate: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8414.26 ▼0.291.84 ▲0.2255.48 ▲13.31
Dashboard /wp-admin2,211 ▲315.63 ▲0.0290.29 ▼6.6338.76 ▼5.33
Posts /wp-admin/edit.php2,119 ▲161.95 ▼0.0741.24 ▲1.7336.16 ▼0.49
Add New Post /wp-admin/post-new.php1,539 ▲223.05 ▲4.91657.02 ▲30.8553.92 ▼12.81
Media Library /wp-admin/upload.php1,419 ▲224.24 ▼0.02101.19 ▲1.1244.50 ▼1.00

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots need descriptions #1, #2, #3, #4 in osi-affiliate/assets to your readme.txt
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === osi-affiliate === )
Please take inspiration from this readme.txt

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

"OSI Affiliate" version 1.1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
136 characters long description:
OSI Affiliate plugin allows customers to add any code to a web site. For example, we have code that we give people for our saas product.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected1,527 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
CSS2501602
PHP1111335514
SVG100399
JavaScript13012

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
13 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/suggest.png3.30KB0.85KB▼ 74.28%
images/gplus.png3.34KB0.79KB▼ 76.37%
images/pause.png6.80KB4.51KB▼ 33.71%
images/twitter.png0.61KB0.75KB0.00%
images/facebook.png0.59KB0.66KB0.00%