90% arnold-analytics

Code Review | Indiemetrics

WordPress plugin Indiemetrics scored90%from 54 tests.

About plugin

  • Plugin page: arnold-analytics
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Mar 10, 2020
  • Latest release: Apr 21, 2020
  • Number of updates: 6
  • Update frequency: every 7.0 days
  • Top authors: argovaerts (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /513 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▲1.70ms] Passed 4 tests

An overview of server-side resources used by Indiemetrics
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1237.48 ▼3.26
Dashboard /wp-admin3.43 ▲0.1346.03 ▲1.01
Posts /wp-admin/edit.php3.55 ▲0.1951.90 ▲5.24
Add New Post /wp-admin/post-new.php6.01 ▲0.12107.78 ▲13.49
Media Library /wp-admin/upload.php3.36 ▲0.1235.98 ▲3.79
Indiemetrics /wp-admin/options-general.php?page=arnold_analytics_settings3.3231.80

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Indiemetrics
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.26 ▼1.121.59 ▼0.2637.79 ▼10.41
Dashboard /wp-admin2,213 ▲225.87 ▲0.98107.33 ▼0.2644.10 ▲2.02
Posts /wp-admin/edit.php2,096 ▲71.96 ▼0.0839.43 ▲2.1536.13 ▲1.25
Add New Post /wp-admin/post-new.php1,545 ▲1218.19 ▼4.87597.23 ▼73.6548.91 ▼12.22
Media Library /wp-admin/upload.php1,392 ▲74.21 ▼0.0293.06 ▼5.5740.26 ▼2.25
Indiemetrics /wp-admin/options-general.php?page=arnold_analytics_settings7952.0325.9827.77

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • arnold_analytics_version
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

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 no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: plugin, analytics, arnold analytics, wordpress, indiemetrics

arnold-analytics/arnold-analytics.php 92% from 13 tests

This is the main PHP file of "Indiemetrics" version 1.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("3.9" instead of "1.0")

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
Good job! No executable or dangerous file extensions detected568 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP6171441522
SVG10128
JSON10018

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity34.33
▷ Minimum class complexity13.00
▷ Maximum class complexity61.00
Average method complexity3.88
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods35
▷ Static methods25.71%
▷ Public methods3291.43%
▷ Protected methods00.00%
▷ Private methods38.57%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants0
▷ Global constants00.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
4 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png7.27KB4.11KB▼ 43.44%
assets/banner-1544x500.png35.95KB11.19KB▼ 68.88%
assets/icon-256x256.png17.43KB11.89KB▼ 31.78%
assets/icon-128x128.png6.98KB4.32KB▼ 38.15%