84% micrometrics

Code Review | MicroMetrics

WordPress plugin MicroMetrics scored84%from 54 tests.

About plugin

  • Plugin page: micrometrics
  • Plugin version: 1.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: Jun 24, 2022
  • Latest release: Oct 18, 2023
  • Number of updates: 17
  • Update frequency: every 28.3 days
  • Top authors: micrometrics (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /732 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

An overview of server-side resources used by MicroMetrics
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0636.91 ▼0.15
Dashboard /wp-admin3.38 ▲0.0744.09 ▼3.47
Posts /wp-admin/edit.php3.43 ▲0.0746.26 ▼0.62
Add New Post /wp-admin/post-new.php5.96 ▲0.0780.45 ▼22.08
Media Library /wp-admin/upload.php3.30 ▲0.0736.73 ▲2.42
General /wp-admin/admin.php?page=micrometrics-general3.2628.70
Eventos /wp-admin/admin.php?page=micrometrics-events3.2630.04

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
micrometrics_es_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for MicroMetrics
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.11 ▼0.522.39 ▲0.8642.98 ▲2.14
Dashboard /wp-admin2,222 ▲445.58 ▼0.0580.98 ▼20.5237.15 ▼5.29
Posts /wp-admin/edit.php2,127 ▲271.98 ▼0.0233.98 ▼1.8234.61 ▼0.54
Add New Post /wp-admin/post-new.php1,548 ▲1323.02 ▲4.87580.46 ▼36.4247.43 ▼6.81
Media Library /wp-admin/upload.php1,427 ▲244.22 ▲0.0494.63 ▼7.0343.92 ▲0.97
General /wp-admin/admin.php?page=micrometrics-general9742.0322.6627.46
Eventos /wp-admin/admin.php?page=micrometrics-events9192.0423.8125.24

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/micrometrics/micrometrics.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === micrometrics === )
You can look at the official readme.txt

micrometrics/micrometrics.php Passed 13 tests

The primary PHP file in "MicroMetrics" version 1.3.2 is used by WordPress to initiate all plugin functionality
133 characters long description:
Este plugin agrega de forma fácil y rápida el código de seguimiento de MicroMetrics a tu sitio web y te permite registrar eventos.

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
Good job! No executable or dangerous file extensions detected392 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP51325312
PO File1283380

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 compressed PNG files occupy 0.13MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png77.24KB77.09KB0.20%
screenshot-2.png58.51KB56.72KB▼ 3.07%