73% intrackt-offers

Code Review | Intrackt Offers

WordPress plugin Intrackt Offers scored 73% from 54 tests.

About plugin

  • Plugin page: intrackt-offers
  • Plugin version: 1.1.2
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.2-5.8
  • WordPress version: 5.9.2
  • First release: Jul 24, 2020
  • Latest release: Jul 15, 2021
  • Number of updates: 7
  • Update frequency: every 51.0 days
  • Top authors: intrackt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 277 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

This is a short check of server-side resources used by Intrackt Offers
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▼0.0044.51 ▼8.11
Dashboard /wp-admin3.47 ▲0.0635.25 ▼1.19
Posts /wp-admin/edit.php3.69 ▲0.0540.84 ▼11.40
Add New Post /wp-admin/post-new.php6.93 ▼0.04100.20 ▼1,170.73
Media Library /wp-admin/upload.php3.35 ▲0.0625.30 ▲0.07
Intrackt /wp-admin/admin.php?page=intrackt-common3.3222.83
--Log /wp-admin/admin.php?page=intracktoffers-log3.3226.69
Offers /wp-admin/admin.php?page=intracktoffers-main3.3825.46

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 8 new files
Database: 1 new table, 1 new option
New tables
wp_intrackt_log
New WordPress options
intrackt_offers

Browser metrics Passed 4 tests

An overview of browser requirements for Intrackt Offers
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,209 ▼53515.88 ▲0.180.34 ▼6.1645.72 ▲43.16
Dashboard /wp-admin2,926 ▲666.15 ▼0.10116.69 ▼4.94152.12 ▼12.54
Posts /wp-admin/edit.php2,691 ▼03.25 ▲0.0263.08 ▼14.52134.30 ▼10.84
Add New Post /wp-admin/post-new.php1,688 ▲2718.44 ▲2.34437.61 ▼8.48175.08 ▲16.61
Media Library /wp-admin/upload.php1,729 ▲315.53 ▼0.02153.45 ▲17.80187.97 ▼2.12
Intrackt /wp-admin/admin.php?page=intrackt-common1,0212.3657.07150.09
--Log /wp-admin/admin.php?page=intracktoffers-log1,0062.3753.75172.21
Offers /wp-admin/admin.php?page=intracktoffers-main2,1078.77159.85258.35

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie tables were found after uninstall: 1 table
    • wp_intrackt_log
  • This plugin does not fully uninstall, leaving 1 option in the database
    • intrackt_offers

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 10× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      require_once(): Failed opening required 'INTRACKT_OFFERS_PLUGIN_DIRclass.Intrackt-Offers-PageLog.php' (include_path='.:/usr/share/php') in wp-content/plugins/intrackt-offers/class.Intrackt-Offers-Common.php on line 7
    • > PHP Warning
      Use of undefined constant INTRACKT_OFFERS_PLUGIN_DIR - assumed 'INTRACKT_OFFERS_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/intrackt-offers/class.Intrackt-Offers-PageMain.php on line 7
    • > PHP Warning
      require_once(INTRACKT_OFFERS_PLUGIN_DIRclass.Intrackt-Offers-PageLog.php): failed to open stream: No such file or directory in wp-content/plugins/intrackt-offers/class.Intrackt-Offers-PageMain.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/intrackt-offers/Intrackt-Offers.php:27
    • > PHP Warning
      require_once(INTRACKT_OFFERS_PLUGIN_DIRclass.Intrackt-Offers-PageLog.php): failed to open stream: No such file or directory in wp-content/plugins/intrackt-offers/class.Intrackt-Offers-Common.php on line 7
    • > PHP Fatal error
      require_once(): Failed opening required 'INTRACKT_OFFERS_PLUGIN_DIRclass.Intrackt-Offers-PageMain.php' (include_path='.:/usr/share/php') in wp-content/plugins/intrackt-offers/class.Intrackt-Offers-Manager.php on line 7
    • > PHP Warning
      Use of undefined constant INTRACKT_OFFERS_PLUGIN_DIR - assumed 'INTRACKT_OFFERS_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/intrackt-offers/class.Intrackt-Offers-Manager.php on line 7
    • > PHP Warning
      require_once(INTRACKT_OFFERS_PLUGIN_DIRclass.Intrackt-Offers-PageMain.php): failed to open stream: No such file or directory in wp-content/plugins/intrackt-offers/class.Intrackt-Offers-Manager.php on line 7
    • > PHP Warning
      Use of undefined constant INTRACKT_OFFERS_PLUGIN_DIR - assumed 'INTRACKT_OFFERS_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/intrackt-offers/class.Intrackt-Offers-Common.php on line 7
    • > PHP Fatal error
      require_once(): Failed opening required 'INTRACKT_OFFERS_PLUGIN_DIRclass.Intrackt-Offers-PageLog.php' (include_path='.:/usr/share/php') in wp-content/plugins/intrackt-offers/class.Intrackt-Offers-PageMain.php on line 7

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

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:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
Please take inspiration from this readme.txt

intrackt-offers/Intrackt-Offers.php 85% from 13 tests

This is the main PHP file of "Intrackt Offers" version 1.1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("intrackt-offers.php" instead of "Intrackt-Offers.php")

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
Success! There were no dangerous files found in this plugin1,304 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP65341,1061,304

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity37.40
▷ Minimum class complexity5.00
▷ Maximum class complexity115.00
Average method complexity3.76
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods66
▷ Static methods66100.00%
▷ Public methods6090.91%
▷ Protected methods00.00%
▷ Private methods69.09%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin