79% revoffers-advertiser-integration

Code Review | RevOffers Advertiser Integration

WordPress plugin RevOffers Advertiser Integration scored79%from 54 tests.

About plugin

  • Plugin page: revoffers-adverti...
  • Plugin version: 1.5.3
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3.1
  • WordPress version: 6.3.1
  • First release: Jun 19, 2018
  • Latest release: Nov 22, 2023
  • Number of updates: 38
  • Update frequency: every 52.2 days
  • Top authors: homeyjd (89.47%)katalysdev (13.16%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /5,286 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.20MB] [CPU: ▼4.95ms] Passed 4 tests

Server-side resources used by RevOffers Advertiser Integration
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1536.37 ▲0.78
Dashboard /wp-admin3.53 ▲0.1848.32 ▼19.38
Posts /wp-admin/edit.php3.64 ▲0.2849.75 ▲2.89
Add New Post /wp-admin/post-new.php6.23 ▲0.3487.76 ▼4.08
Media Library /wp-admin/upload.php3.45 ▲0.2135.95 ▲3.56
RevOffers Network /wp-admin/options-general.php?page=revoffers-advertiser-integration3.4333.16

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 11 new files
Database: 1 new table, 7 new options
New tables
wp_plugin_revoffers_queue
New WordPress options
widget_recent-posts
revoffers_db_version
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by RevOffers Advertiser Integration
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,129 ▲38217.50 ▲2.8614.95 ▲13.27176.08 ▲139.03
Dashboard /wp-admin2,193 ▲155.60 ▼0.1196.11 ▼20.7241.21 ▼6.79
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0438.62 ▲0.9936.17 ▲1.26
Add New Post /wp-admin/post-new.php1,529 ▲323.28 ▼0.43635.41 ▲13.7155.48 ▲5.16
Media Library /wp-admin/upload.php1,404 ▲14.22 ▲0.0598.00 ▼1.0542.09 ▼0.91
RevOffers Network /wp-admin/options-general.php?page=revoffers-advertiser-integration8991.9924.8131.34

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

Smoke tests 50% from 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 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/revoffers-advertiser-integration/export_orders.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function revoffers\\rest\\register_rest_route() in wp-content/plugins/revoffers-advertiser-integration/rest_api.php:183
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/revoffers-advertiser-integration/admin_page.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

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
4 plugin tags: tracking, affiliate, revoffers, katalys

revoffers-advertiser-integration/revoffers-advertiser-integration.php Passed 13 tests

This is the main PHP file of "RevOffers Advertiser Integration" version 1.5.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
90 characters long description:
Integrate RevOffers tracking snippet to reward influencers driving customers to your site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin1,567 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP62856491,554
JSON10013

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity38.50
▷ Minimum class complexity7.00
▷ Maximum class complexity70.00
Average method complexity5.17
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods1266.67%
▷ Protected methods211.11%
▷ Private methods422.22%
Functions57
▷ Named functions4375.44%
▷ Anonymous functions1424.56%
Constants7
▷ Global constants00.00%
▷ Class constants7100.00%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/revoffers_dark.png19.13KB10.45KB▼ 45.36%
images/logo.png1.27KB0.73KB▼ 42.17%