78% forward-attribution

Code Review | Forward Attribution

WordPress plugin Forward Attribution scored78%from 54 tests.

About plugin

  • Plugin page: forward-attribution
  • Plugin version: 1.2.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 8, 2023
  • Latest release: Feb 15, 2023
  • Number of updates: 9
  • Update frequency: every 1.2 days
  • Top authors: hainesgritton (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /182 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.49ms] 75% from 4 tests

Server-side resources used by Forward Attribution
Please have a look at the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 816.42ms on /wp-admin/options-general.php?page=forward-attribution/includes/class_fwdatt_license.php)
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.18 ▼2.53
Dashboard /wp-admin3.32 ▲0.0152.79 ▼8.18
Posts /wp-admin/edit.php3.37 ▲0.0157.64 ▲2.15
Add New Post /wp-admin/post-new.php5.90 ▲0.0199.62 ▼8.26
Media Library /wp-admin/upload.php3.24 ▲0.0139.45 ▲1.02
Forward Attribution /wp-admin/options-general.php?page=forward-attribution/includes/class_fwdatt_license.php3.21816.42

Server storage [IO: ▲0.02MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Forward Attribution
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.24 ▼0.181.98 ▲0.1049.19 ▲5.99
Dashboard /wp-admin2,199 ▲255.61 ▼0.05103.65 ▲6.3644.82 ▲4.02
Posts /wp-admin/edit.php2,107 ▲72.03 ▲0.0243.19 ▼0.8638.47 ▲5.00
Add New Post /wp-admin/post-new.php1,531 ▲523.17 ▲0.19671.63 ▼55.2760.90 ▲5.60
Media Library /wp-admin/upload.php1,404 ▲44.13 ▼0.05111.14 ▼3.5948.58 ▼0.85
Forward Attribution /wp-admin/options-general.php?page=forward-attribution/includes/class_fwdatt_license.php8191.9929.5027.13

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=forward-attribution/includes/class_fwdatt_license.php
    • > Notice in wp-content/plugins/forward-attribution/includes/class_fwdatt_license.php+42
    Trying to get property 'result' of non-object

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
Please take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/forward-attribution/includes/class-fwdatt-plug-menu.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/forward-attribution/includes/class_fwdatt_license.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 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
There were not plugin tags detected

forward-attribution/forward-attribution.php 92% from 13 tests

The principal PHP file in "Forward Attribution" v. 1.2.4 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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 detected231 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP873117214
PO File10017

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity2.80
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods8
▷ Static methods450.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.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
No PNG files were detected