73% offerit-affiliate-tracking

Code Review | Offer IT Affiliate Tracking

WordPress plugin Offer IT Affiliate Tracking scored 73% from 54 tests.

About plugin

  • Plugin page: offerit-affiliate...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8
  • WordPress version: 6.3.1
  • First release: Jul 31, 2013
  • Latest release: Mar 21, 2014
  • Number of updates: 7
  • Update frequency: every 34.4 days
  • Top authors: jbrabo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 844 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

Analyzing server-side resources used by Offer IT Affiliate Tracking
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.44 ▼2.13
Dashboard /wp-admin3.32 ▲0.0244.67 ▼2.08
Posts /wp-admin/edit.php3.37 ▲0.0245.98 ▼2.63
Add New Post /wp-admin/post-new.php5.90 ▲0.0282.24 ▼14.77
Media Library /wp-admin/upload.php3.24 ▲0.0236.63 ▲2.84
OfferIT setup /wp-admin/options-general.php?page=offer-it3.2731.46

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 6 new files
Database: 1 new table, 32 new options
New tables
wp_offerit_log
New WordPress options
offer_it_map_custom1
offer_it_map_phone
widget_recent-posts
offer_it_map_address2
offer_it_tracking_code
db_upgraded
offer_it_map_total
widget_theysaidso_widget
offer_it_map_city
offer_it_domain
...

Browser metrics Passed 4 tests

A check of browser resources used by Offer IT Affiliate Tracking
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.20 ▼1.181.81 ▼0.0644.45 ▼1.63
Dashboard /wp-admin2,210 ▲195.87 ▲0.93107.32 ▲1.8440.93 ▼1.13
Posts /wp-admin/edit.php2,090 ▲12.13 ▲0.1439.56 ▼2.2333.70 ▼0.45
Add New Post /wp-admin/post-new.php1,545 ▲1218.37 ▼4.72618.46 ▼58.4055.77 ▲2.82
Media Library /wp-admin/upload.php1,392 ▲44.22 ▼0.0396.97 ▼4.3542.41 ▼1.90
OfferIT setup /wp-admin/options-general.php?page=offer-it1,2142.0522.5145.20

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_offerit_log
  • Zombie WordPress options were found after uninstall: 32 options
    • offer_it_map_phone
    • db_upgraded
    • offer_it_db_column
    • offer_it_log
    • widget_recent-posts
    • offer_it_map_state
    • offer_it_tracking_code
    • offer_it_map_custom2
    • offer_it_map_custom3
    • widget_recent-comments
    • ...

Smoke tests 75% 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 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
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/offerit-affiliate-tracking/offer-it.class.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/offerit-affiliate-tracking/offer-it-admin.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (This is the screenshot of admin panel: screenshot-1.png.) image missing
The official readme.txt is a good inspiration

offerit-affiliate-tracking/offer-it.php 85% from 13 tests

"Offer IT Affiliate Tracking" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 318 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("offerit-affiliate-tracking.php" instead of "offer-it.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected407 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP39856397
Markdown14010

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.28
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity4.43
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.16MB with 0.11MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png159.05KB48.51KB▼ 69.50%