84% truconversion-connect

Code Review | TruConversion Connect

WordPress plugin TruConversion Connect scored84%from 54 tests.

About plugin

  • Plugin page: truconversion-con...
  • Plugin version: 1.2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-6.0
  • WordPress version: 6.3.1
  • First release: Nov 8, 2016
  • Latest release: Nov 15, 2022
  • Number of updates: 37
  • Update frequency: every 59.3 days
  • Top authors: truconversion (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /3,843 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.06MB] [CPU: ▼9.04ms] Passed 4 tests

Server-side resources used by TruConversion Connect
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.94 ▼5.14
Dashboard /wp-admin3.38 ▲0.0345.65 ▼14.75
Posts /wp-admin/edit.php3.49 ▲0.1345.39 ▲2.61
Add New Post /wp-admin/post-new.php5.96 ▲0.0778.16 ▼15.97
Media Library /wp-admin/upload.php3.30 ▲0.0732.00 ▼0.31

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

TruConversion Connect: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7014.42 ▼0.231.78 ▼0.0843.74 ▼1.07
Dashboard /wp-admin2,219 ▲315.80 ▼0.0896.39 ▼7.3838.87 ▼3.26
Posts /wp-admin/edit.php2,113 ▲242.04 ▼0.0042.55 ▲7.8335.33 ▼1.57
Add New Post /wp-admin/post-new.php1,543 ▲1023.58 ▲0.32597.14 ▼78.9945.19 ▼7.29
Media Library /wp-admin/upload.php1,415 ▲244.23 ▲0.0598.94 ▼3.4942.30 ▼4.54

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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 fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/truconversion-connect/truconversion-connect.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/truconversion-connect/truconversion-settings.php:370

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention: The official readme.txt is a good inspiration

truconversion-connect/truconversion-connect.php Passed 13 tests

"TruConversion Connect" version 1.2.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
49 characters long description:
Enables TruConversion tracking code on all pages.

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
No dangerous file extensions were detected753 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2408414
JavaScript1163185
CSS101154

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/connection.png10.25KB5.23KB▼ 48.98%
images/logo.png5.05KB2.55KB▼ 49.54%
images/wp-tc-logo.png7.50KB3.17KB▼ 57.82%