90% lp-google-analytics

Code Review | LP Google Analytics

WordPress plugin LP Google Analytics scored 90% from 54 tests.

About plugin

  • Plugin page: lp-google-analytics
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4.2
  • WordPress version: 6.3.1
  • First release: Feb 10, 2016
  • Latest release: Feb 10, 2016
  • Number of updates: 4
  • Update frequency: every 1.8 days
  • Top authors: layerpoint (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 633 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.03MB] [CPU: ▼0.02ms] Passed 4 tests

Analyzing server-side resources used by LP Google Analytics
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.30 ▼1.29
Dashboard /wp-admin3.34 ▲0.0446.09 ▼1.83
Posts /wp-admin/edit.php3.39 ▲0.0348.37 ▲1.68
Add New Post /wp-admin/post-new.php5.92 ▲0.0394.65 ▲7.63
Media Library /wp-admin/upload.php3.26 ▲0.0334.72 ▲1.37
LP Google Analytics /wp-admin/options-general.php?page=lp-ga-options3.2332.85

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

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

Browser metrics Passed 4 tests

A check of browser resources used by LP Google Analytics
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.22 ▼1.532.16 ▲0.1850.86 ▲4.03
Dashboard /wp-admin2,210 ▲395.77 ▲0.9296.17 ▼14.1942.02 ▲0.22
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0239.02 ▲4.2335.06 ▲0.63
Add New Post /wp-admin/post-new.php1,548 ▲1518.42 ▼4.59601.42 ▼62.1050.06 ▼14.36
Media Library /wp-admin/upload.php1,392 ▲14.23 ▼0.0796.15 ▼8.0841.42 ▼5.08
LP Google Analytics /wp-admin/options-general.php?page=lp-ga-options8572.2023.3822.26

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
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: analytics, ga, tracking, google, wordpress statistics...

lp-google-analytics/lp-google-analytics.php 92% from 13 tests

The primary PHP file in "LP Google Analytics" version 1.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin142 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP34751142

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.22
Average class complexity2.50
▷ Minimum class complexity2.00
▷ Maximum class complexity3.00
Average method complexity1.30
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.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
PNG images were not found in this plugin