68% cp-referrer-and-conversions-tracking

Code Review | CP Referrer and Conversion Tracking

WordPress plugin CP Referrer and Conversion Tracking scored68%from 54 tests.

About plugin

  • Plugin page: cp-referrer-and-c...
  • Plugin version: 1.01.21
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Feb 26, 2020
  • Latest release: Nov 28, 2023
  • Number of updates: 21
  • Update frequency: every 65.2 days
  • Top authors: codepeople (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

500+ active /7,061 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.15MB] [CPU: ▼5.85ms] Passed 4 tests

A check of server-side resources used by CP Referrer and Conversion Tracking
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1539.41 ▼5.76
Dashboard /wp-admin3.48 ▲0.1349.54 ▼16.19
Posts /wp-admin/edit.php3.59 ▲0.2350.86 ▲3.17
Add New Post /wp-admin/post-new.php6.06 ▲0.1794.68 ▼4.62
Media Library /wp-admin/upload.php3.40 ▲0.1736.94 ▲4.18
I Need Help /wp-admin/admin.php?page=cp_reftrack_support3.3533.29
Tracking Stats /wp-admin/admin.php?page=cp_reftrack_report3.4735.97
Referral Sources /wp-admin/admin.php?page=cp_reftrack_parameters3.4333.15
CP Referrer Tracking /wp-admin/admin.php?page=cp_reftrack3.5334.18
Tracking Logs /wp-admin/admin.php?page=cp_reftrack_list3.4333.08
Conversions /wp-admin/admin.php?page=cp_reftrack_conversions3.4633.59
Add Ons /wp-admin/admin.php?page=cp_reftrack_addons3.5233.85
General Settings /wp-admin/admin.php?page=cp_reftrack_settings3.3833.26
CP Referrer Tracking /wp-admin/options-general.php?page=cp_reftrack3.5337.48

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 49 new files
Database: 3 new tables, 6 new options
New tables
wp_cpreftrack_conversions
wp_cpreftrack_logs
wp_cpreftrack_registeredrefs
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for CP Referrer and Conversion Tracking
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲9814.22 ▼0.491.73 ▲0.1236.92 ▼6.15
Dashboard /wp-admin2,250 ▲735.63 ▼0.0192.65 ▼4.1443.70 ▲1.08
Posts /wp-admin/edit.php2,155 ▲552.00 ▼0.0239.12 ▼6.7835.17 ▼4.00
Add New Post /wp-admin/post-new.php1,569 ▲4323.55 ▲0.55582.33 ▼83.4053.90 ▲7.49
Media Library /wp-admin/upload.php1,455 ▲554.11 ▼0.0395.96 ▼4.1841.47 ▼3.82
I Need Help /wp-admin/admin.php?page=cp_reftrack_support1,6412.2550.4060.46
Tracking Stats /wp-admin/admin.php?page=cp_reftrack_report1,3121.8029.2948.84
Referral Sources /wp-admin/admin.php?page=cp_reftrack_parameters1,0201.8627.1534.31
CP Referrer Tracking /wp-admin/admin.php?page=cp_reftrack9481.9027.2828.74
Tracking Logs /wp-admin/admin.php?page=cp_reftrack_list9851.8028.8330.57
Conversions /wp-admin/admin.php?page=cp_reftrack_conversions9871.7926.4633.63
Add Ons /wp-admin/admin.php?page=cp_reftrack_addons9931.7425.0844.94
General Settings /wp-admin/admin.php?page=cp_reftrack_settings9251.7924.3928.13
CP Referrer Tracking /wp-admin/options-general.php?page=cp_reftrack9511.7326.6830.09

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The plugin did not uninstall successfully, leaving 3 tables in the database
    • wp_cpreftrack_registeredrefs
    • wp_cpreftrack_conversions
    • wp_cpreftrack_logs
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 22× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/cp-referrer-and-conversions-tracking/cp-admin-int-message-list.inc.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/cp-referrer-and-conversions-tracking/cp-settings.inc.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/cp-referrer-and-conversions-tracking/cp-admin-int-parameters-list.inc.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/cp-referrer-and-conversions-tracking/addons/cf7.addon.php:30
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/cp-referrer-and-conversions-tracking/cp-full-stats.inc.php:5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/cp-referrer-and-conversions-tracking/cp-admin-int-report.inc.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/cp-referrer-and-conversions-tracking/addons/cfwpp.addon.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/cp-referrer-and-conversions-tracking/addons/userregistration.addon.php:30
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/cp-referrer-and-conversions-tracking/cp-admin-int-conversions-list.inc.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'CP_REFTRACK_BaseClass' not found in wp-content/plugins/cp-referrer-and-conversions-tracking/cp-main-class.inc.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=cp_reftrack_report
    • > Network (severe)
    wp-content/plugins/cp-referrer-and-conversions-tracking/js/excanvas.min.js - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: logs, referrer, marketing, stats, conversion...

cp-referrer-and-conversions-tracking/cp-referrer-tracking-plugin.php 92% from 13 tests

The main file in "CP Referrer and Conversion Tracking" v. 1.01.21 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("cp-referrer-and-conversions-tracking.php" instead of "cp-referrer-tracking-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin3,847 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP248972302,765
CSS5731651,082
JavaScript1010

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity13.50
▷ Minimum class complexity1.00
▷ Maximum class complexity97.00
Average method complexity2.79
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods98
▷ Static methods00.00%
▷ Public methods9697.96%
▷ Protected methods11.02%
▷ Private methods11.02%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
16 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/cupertino/images/ui-icons_ffffff_256x240.png4.27KB4.11KB▼ 3.78%
css/cupertino/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png0.10KB0.14KB0.00%
css/cupertino/images/ui-icons_2694e8_256x240.png4.27KB4.11KB▼ 3.78%
css/cupertino/images/ui-bg_glass_50_3baae3_1x400.png0.17KB0.16KB▼ 6.82%
css/cupertino/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png0.25KB0.15KB▼ 38.25%