78% udimi-optin

Code Review | Udimi Optin Tracking

WordPress plugin Udimi Optin Tracking scored78%from 54 tests.

About plugin

  • Plugin page: udimi-optin
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.1
  • WordPress version: 6.3.1
  • First release: Mar 8, 2016
  • Latest release: Nov 14, 2022
  • Number of updates: 29
  • Update frequency: every 84.2 days
  • Top authors: nikax (79.31%)webocoders (24.14%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,095 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.37ms] Passed 4 tests

Analyzing server-side resources used by Udimi Optin Tracking
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.61 ▲0.61
Dashboard /wp-admin3.34 ▲0.0344.61 ▼16.41
Posts /wp-admin/edit.php3.39 ▲0.0347.20 ▲2.10
Add New Post /wp-admin/post-new.php5.94 ▲0.0587.90 ▼4.54
Media Library /wp-admin/upload.php3.26 ▲0.0335.84 ▼1.14

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Udimi Optin Tracking
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲3814.38 ▼0.011.65 ▼0.2343.51 ▲0.51
Dashboard /wp-admin2,218 ▲415.77 ▲0.2081.09 ▼9.1974.89 ▲36.24
Posts /wp-admin/edit.php2,126 ▲262.01 ▲0.0038.30 ▲0.1732.24 ▼3.66
Add New Post /wp-admin/post-new.php1,707 ▲18124.95 ▲1.34674.51 ▲0.1853.76 ▼0.82
Media Library /wp-admin/upload.php1,414 ▲144.21 ▼0.0096.83 ▲3.0766.47 ▲22.54

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/udimi-optin/udimi-optin.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'UdimiOptin' not found in wp-content/plugins/udimi-optin/admin/settings.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% 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
Attributes that need to be fixed:
  • Screenshots: Add descriptions for screenshots #1, #2 in udimi-optin/assets to your readme.txt
You can take inspiration from this readme.txt

udimi-optin/udimi-optin.php Passed 13 tests

The main PHP file in "Udimi Optin Tracking" ver. 2.0.0 adds more information about the plugin and also serves as the entry point for this plugin
73 characters long description:
This plugin automatically inserts Udimi Optin tracking code to your site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin241 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP43533208
JavaScript10033

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods981.82%
▷ Protected methods00.00%
▷ Private methods218.18%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants8
▷ Global constants00.00%
▷ Class constants8100.00%
▷ Public constants8100.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
4 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo16.png1.01KB0.18KB▼ 82.42%
images/logo24.png1.07KB0.23KB▼ 78.74%
images/logo64.png1.24KB0.32KB▼ 74.04%
images/logo.png1.24KB0.32KB▼ 74.08%