84% integrate-umami

Code Review | Integrate Umami

WordPress plugin Integrate Umami scored84%from 54 tests.

About plugin

  • Plugin page: integrate-umami
  • Plugin version: 0.5.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Sep 30, 2022
  • Latest release: Sep 18, 2023
  • Number of updates: 24
  • Update frequency: every 14.7 days
  • Top authors: ancocodet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /1,877 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.43ms] Passed 4 tests

A check of server-side resources used by Integrate Umami
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0936.17 ▼4.06
Dashboard /wp-admin3.40 ▲0.0544.05 ▼16.58
Posts /wp-admin/edit.php3.51 ▲0.1644.88 ▲2.67
Add New Post /wp-admin/post-new.php5.98 ▲0.0980.62 ▲0.24
Media Library /wp-admin/upload.php3.32 ▲0.0939.98 ▲5.87
Integrate Umami /wp-admin/options-general.php?page=integrate-umami3.3137.12

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Integrate Umami
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.29 ▼0.271.66 ▲0.0039.09 ▼5.93
Dashboard /wp-admin2,199 ▲225.63 ▲0.0984.48 ▼15.6939.17 ▼2.83
Posts /wp-admin/edit.php2,101 ▲12.03 ▲0.0636.79 ▲1.1832.97 ▼3.18
Add New Post /wp-admin/post-new.php1,541 ▲1518.09 ▼5.02632.52 ▼78.7961.82 ▲3.77
Media Library /wp-admin/upload.php1,401 ▲14.21 ▼0.02108.89 ▲5.2743.96 ▼1.44
Integrate Umami /wp-admin/options-general.php?page=integrate-umami9542.0326.5452.06

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

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
Good news, no errors were detected

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 fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Ancozockt\\Umami\\plugin_dir_path() in wp-content/plugins/integrate-umami/wp-umami.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/integrate-umami/inc/templates/settings-page.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: umami, analytics

integrate-umami/wp-umami.php 92% from 13 tests

The entry point to "Integrate Umami" version 0.5.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("integrate-umami.php" instead of "wp-umami.php")

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
No dangerous file extensions were detected1,639 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP15183519922
Markdown21360610
JSON20044
CSS17033
XML17230

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity16.43
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity3.02
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods55
▷ Static methods2240.00%
▷ Public methods5294.55%
▷ Protected methods00.00%
▷ Private methods35.45%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants2
▷ Global constants2100.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
No PNG files were detected