89% wc-firebase-analytics

Code Review | Integration of Firebase Analytics and WooCommerce

WordPress plugin Integration of Firebase Analytics and WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: wc-firebase-analy...
  • Plugin version: 0.2.8
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6.0-5.6.0
  • WordPress version: 6.3.1
  • First release: Dec 31, 2019
  • Latest release: Jun 4, 2021
  • Number of updates: 12
  • Update frequency: every 44.1 days
  • Top authors: appmaker (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,395 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
This plugin's installer ran successfully

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

A check of server-side resources used by Integration of Firebase Analytics and WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0739.69 ▼4.96
Dashboard /wp-admin3.41 ▲0.0649.08 ▼5.79
Posts /wp-admin/edit.php3.52 ▲0.1251.99 ▲0.89
Add New Post /wp-admin/post-new.php5.99 ▲0.0695.92 ▲3.97
Media Library /wp-admin/upload.php3.33 ▲0.0638.16 ▲0.90

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Integration of Firebase Analytics and WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲6214.36 ▲0.071.94 ▲0.0638.93 ▼0.16
Dashboard /wp-admin2,229 ▲495.67 ▲0.0587.70 ▼9.3264.28 ▲24.99
Posts /wp-admin/edit.php2,135 ▲352.12 ▲0.1438.19 ▲2.4039.00 ▼0.36
Add New Post /wp-admin/post-new.php1,627 ▲10122.68 ▼0.47659.46 ▲1.74192.41 ▲130.76
Media Library /wp-admin/upload.php1,431 ▲374.15 ▼0.04100.37 ▼0.5162.97 ▲17.66

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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 93% from 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
5 plugin tags: firebase analytics, appmakerxyz, firebase, woocommerce, appmaker

wc-firebase-analytics/firebase-analytics-for-woocommerce.php 85% from 13 tests

The main PHP script in "Integration of Firebase Analytics and WooCommerce" version 0.2.8 is automatically included on every request by WordPress
It is important to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("4.4" instead of "2.6.0")
  • Main file name: Name the main plugin file the same as the plugin slug ("wc-firebase-analytics.php" instead of "firebase-analytics-for-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin439 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP33933316
JavaScript73322123

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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