74% overengineer-gasp

Code Review | Simple Plugin for Google Analytics

WordPress plugin Simple Plugin for Google Analytics scored74%from 54 tests.

About plugin

  • Plugin page: overengineer-gasp
  • Plugin version: 1.1.2
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.2
  • WordPress version: 6.3.1
  • First release: Sep 2, 2019
  • Latest release: Sep 3, 2019
  • Number of updates: 8
  • Update frequency: every 0.1 days
  • Top authors: overengineer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /795 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼1.86MB] [CPU: ▼57.30ms] Passed 4 tests

This is a short check of server-side resources used by Simple Plugin for Google Analytics
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.395.82 ▼36.42
Dashboard /wp-admin2.19 ▼1.169.76 ▼59.47
Posts /wp-admin/edit.php2.19 ▼1.179.50 ▼36.83
Add New Post /wp-admin/post-new.php2.19 ▼3.719.43 ▼96.46
Media Library /wp-admin/upload.php2.19 ▼1.0410.71 ▼27.06
Google Analytics /wp-admin/options-general.php?page=gasp2.199.08

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Simple Plugin for Google Analytics
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.35 ▼0.011.73 ▼0.5239.06 ▼3.13
Dashboard /wp-admin2,193 ▲195.56 ▼0.0685.86 ▼4.2039.30 ▼2.41
Posts /wp-admin/edit.php2,107 ▲72.02 ▼0.0041.21 ▲5.2836.43 ▼2.08
Add New Post /wp-admin/post-new.php1,529 ▼223.06 ▲0.05673.45 ▲50.1150.76 ▼3.70
Media Library /wp-admin/upload.php1,395 ▼54.20 ▲0.04106.08 ▲4.3746.04 ▼0.18
Google Analytics /wp-admin/options-general.php?page=gasp8571.9928.8629.41

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/overengineer-gasp/includes/analytics.php+87
    Trying to access array offset on value of type bool
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=gasp
    • > Notice in wp-content/plugins/overengineer-gasp/includes/admin/settings.php+135
    Trying to access array offset on value of type bool

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
Everything seems fine, however this is by no means an exhaustive 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)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: google, analytics, cookiebot

overengineer-gasp/overengineer-gasp.php Passed 13 tests

The entry point to "Simple Plugin for Google Analytics" version 1.1.2 is a PHP file that has certain tags in its header comment area
52 characters long description:
An unofficial WordPress plugin for Google Analytics.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin256 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP565119215
PO File1131441

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods4
▷ Static methods00.00%
▷ Public methods250.00%
▷ Protected methods00.00%
▷ Private methods250.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin