79% tma-webtools

Code Review | TMA-WebTools

WordPress plugin TMA-WebTools scored79%from 54 tests.

About plugin

  • Plugin page: tma-webtools
  • Plugin version: 1.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.1-4.9.5
  • WordPress version: 6.3.1
  • First release: Jan 26, 2016
  • Latest release: May 15, 2018
  • Number of updates: 55
  • Update frequency: every 15.3 days
  • Top authors: thmarx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /998 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.34MB] [CPU: ▼3.88ms] Passed 4 tests

This is a short check of server-side resources used by TMA-WebTools
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2043.08 ▲2.40
Dashboard /wp-admin3.76 ▲0.4251.17 ▼9.21
Posts /wp-admin/edit.php3.81 ▲0.4658.52 ▲10.51
Add New Post /wp-admin/post-new.php6.27 ▲0.3889.52 ▼8.80
Media Library /wp-admin/upload.php3.60 ▲0.3734.60 ▲0.08
Settings /wp-admin/admin.php?page=tma-webtools-setting-admin3.6039.29
TMA WebTools /wp-admin/admin.php?page=tma-webtools/pages/tma-webtools-admin.php3.5936.66

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 53 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
tma_webtools_option
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for TMA-WebTools
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,991 ▲24515.04 ▲0.391.83 ▼0.2043.91 ▲1.76
Dashboard /wp-admin2,391 ▲2006.63 ▲1.72128.77 ▲25.8936.91 ▼2.47
Posts /wp-admin/edit.php2,294 ▲2053.51 ▲1.3852.69 ▲11.6331.87 ▼5.12
Add New Post /wp-admin/post-new.php6,250 ▲4,73025.88 ▲2.67881.64 ▲139.4238.69 ▼21.33
Media Library /wp-admin/upload.php1,430 ▲514.35 ▲0.1286.65 ▼23.6941.86 ▼1.28
Settings /wp-admin/admin.php?page=tma-webtools-setting-admin1,1183.4246.6929.63
TMA WebTools /wp-admin/admin.php?page=tma-webtools/pages/tma-webtools-admin.php1,1343.3640.5147.35

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/tma-webtools/pages/tma-webtools-admin.php
  • 26× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function TMA\\get_option() in wp-content/plugins/tma-webtools/includes/modules/woocommerce/class.frontend.wc_tracker.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'TMA\\Plugins' not found in wp-content/plugins/tma-webtools/includes/modules/woocommerce/module.php:64
    • > PHP Fatal error
      Uncaught Error: Call to undefined function TMA\\add_filter() in wp-content/plugins/tma-webtools/includes/modules/editors/class.beaverbuilder.preview.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses_post() in wp-content/plugins/tma-webtools/includes/widgets/siteorigin/tma_content/tpl/tma-content.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'TMA\\Integration' not found in wp-content/plugins/tma-webtools/includes/frontend/template_tags.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function TMA\\is_admin_bar_showing() in wp-content/plugins/tma-webtools/includes/backend/class.tma_wpadminbar.php:107
    • > PHP Fatal error
      Uncaught Error: Call to undefined function TMA\\is_admin() in wp-content/plugins/tma-webtools/includes/backend/class.tma_ajax.php:86
    • > PHP Fatal error
      require_once(): Failed opening required 'TMA_WEBTOOLS_DIR/modules/class.settings-api.php' (include_path='.:/usr/share/php') in wp-content/plugins/tma-webtools/includes/backend/class.tma_settings.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'SiteOrigin_Widget' not found in wp-content/plugins/tma-webtools/includes/widgets/siteorigin/tma_content/tma_content.php:18
    • > PHP Warning
      require_once(TMA_WEBTOOLS_DIR/modules/class.settings-api.php): failed to open stream: No such file or directory in wp-content/plugins/tma-webtools/includes/backend/class.tma_settings.php on line 5

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 Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: woocommerce, analytics, behaviour targets, digital experience platform, targeting...

tma-webtools/tma-webtools.php Passed 13 tests

Analyzing the main PHP file in "TMA-WebTools" version 1.5.1
47 characters long description:
The integration for webtools user segmentation.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected4,161 lines of code in 44 files:
LanguageFilesBlank linesComment linesLines of code
PHP346591,0232,751
HTML11250567
JavaScript664111556
CSS21023184
PO File14053103

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity12.24
▷ Minimum class complexity1.00
▷ Maximum class complexity69.00
Average method complexity2.85
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes29
▷ Abstract classes13.45%
▷ Concrete classes2896.55%
▷ Final classes13.57%
Methods165
▷ Static methods127.27%
▷ Public methods14084.85%
▷ Protected methods1710.30%
▷ Private methods84.85%
Functions25
▷ Named functions1768.00%
▷ Anonymous functions832.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/tma_content.png0.43KB0.47KB0.00%
images/tma_content_vc_icon.png8.70KB3.72KB▼ 57.24%
images/tma_content_vc_icon_trans.png5.88KB4.30KB▼ 26.83%