78% unofficial-plausible-analytics

Code Review | Unofficial Plausible Analytics Plugin

WordPress plugin Unofficial Plausible Analytics Plugin scored78%from 54 tests.

About plugin

  • Plugin page: unofficial-plausi...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.4.2
  • WordPress version: 6.3.1
  • First release: Jul 28, 2020
  • Latest release: Jul 28, 2020
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: joemclarke (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /422 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼14.08ms] Passed 4 tests

A check of server-side resources used by Unofficial Plausible Analytics Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.02 ▼24.58
Dashboard /wp-admin3.32 ▲0.0250.10 ▼12.89
Posts /wp-admin/edit.php3.37 ▲0.0153.14 ▼0.82
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.08 ▼18.02
Media Library /wp-admin/upload.php3.24 ▲0.0138.82 ▼0.51
Plausible Analytics Settings /wp-admin/options-general.php?page=plausible_unofficial3.1935.34

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
plausible_unofficial_domain_name
plausible_unofficial_disable_admin_analytics
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Unofficial Plausible Analytics Plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲814.71 ▲0.422.59 ▼0.2146.53 ▼21.32
Dashboard /wp-admin2,199 ▲195.65 ▼0.0286.57 ▼10.6739.40 ▼0.61
Posts /wp-admin/edit.php2,107 ▲71.99 ▼0.0643.94 ▲7.3536.70 ▲0.52
Add New Post /wp-admin/post-new.php1,535 ▲323.07 ▲0.05661.02 ▲6.4156.49 ▲1.52
Media Library /wp-admin/upload.php1,407 ▲74.21 ▼0.0995.60 ▼12.2245.79 ▲0.62
Plausible Analytics Settings /wp-admin/options-general.php?page=plausible_unofficial8162.0227.0131.70

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • plausible_unofficial_disable_admin_analytics
    • plausible_unofficial_domain_name
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=plausible_unofficial
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=plausible_unofficial
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/unofficial-plausible-analytics/unofficial_plausible.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
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
2 plugin tags: plausible, analytics

unofficial-plausible-analytics/unofficial_plausible.php 85% from 13 tests

The main PHP file in "Unofficial Plausible Analytics Plugin" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("unofficial-plausible-analytics.php" instead of "unofficial_plausible.php")
  • Description: The description should be shorter than 140 characters (currently 150 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected45 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1131445

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.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
There were not PNG files found in your plugin