84% trueroas

Code Review | TrueROAS AI Ad Attribution

WordPress plugin TrueROAS AI Ad Attribution scored84%from 54 tests.

About plugin

  • Plugin page: trueroas
  • Plugin version: 2.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 8, 2023
  • Latest release: Nov 22, 2023
  • Number of updates: 24
  • Update frequency: every 13.4 days
  • Top authors: trueroas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,357 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

An overview of server-side resources used by TrueROAS AI Ad Attribution
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0245.68 ▲4.04
Dashboard /wp-admin3.32 ▲0.0149.37 ▼0.85
Posts /wp-admin/edit.php3.37 ▲0.0147.27 ▼2.64
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.26 ▼1.79
Media Library /wp-admin/upload.php3.24 ▲0.0136.25 ▲2.49

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for TrueROAS AI Ad Attribution
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲5014.73 ▲0.393.97 ▲2.1638.83 ▼6.71
Dashboard /wp-admin2,214 ▲345.61 ▼0.0694.14 ▲0.4941.64 ▲0.80
Posts /wp-admin/edit.php2,116 ▲131.97 ▼0.0239.43 ▼3.6936.27 ▼1.32
Add New Post /wp-admin/post-new.php1,539 ▲1322.90 ▼0.78601.94 ▼45.1456.02 ▼0.33
Media Library /wp-admin/upload.php1,410 ▲104.18 ▼0.00100.35 ▼2.6543.69 ▲1.17

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function home_url() in wp-content/plugins/trueroas/assets/inc/trueroas-core-functions.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/trueroas/assets/inc/trueroas-admin.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Dashboard), #2 (Ads Manager), #3 (Founder)
The official readme.txt might help

trueroas/true-roas.php 92% from 13 tests

"TrueROAS AI Ad Attribution" version 2.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("trueroas.php" instead of "true-roas.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
Everything looks great! No dangerous files found in this plugin216 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP42067205
JavaScript10310
SVG1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity10.00
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods675.00%
▷ Protected methods00.00%
▷ Private methods225.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin