90% rp-simple-analytics

Code Review | Refined Practice - Simple Analytics Integration

WordPress plugin Refined Practice - Simple Analytics Integration scored90%from 54 tests.

About plugin

  • Plugin page: rp-simple-analytics
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.7
  • WordPress version: 6.3.1
  • First release: Jun 25, 2020
  • Latest release: Apr 14, 2021
  • Number of updates: 8
  • Update frequency: every 36.6 days
  • Top authors: Meester_Paul (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /681 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼4.68ms] Passed 4 tests

A check of server-side resources used by Refined Practice - Simple Analytics Integration
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1339.37 ▼0.04
Dashboard /wp-admin3.46 ▲0.1547.92 ▼3.09
Posts /wp-admin/edit.php3.57 ▲0.2147.98 ▼2.98
Add New Post /wp-admin/post-new.php6.03 ▲0.1492.39 ▼12.61
Media Library /wp-admin/upload.php3.38 ▲0.1439.37 ▲4.65
RP Simple Analytics /wp-admin/options-general.php?page=rp-simple-analytics3.3533.33

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 12 new options
New WordPress options
widget_recent-comments
rpsa_dashboard_widget
rpsa_events_extra_js
can_compress_scripts
rpsa_block_logged_in_users
theysaidso_admin_options
widget_theysaidso_widget
rpsa_block_at_capability
widget_recent-posts
rpsa_events
...

Browser metrics Passed 4 tests

Refined Practice - Simple Analytics Integration: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,878 ▲14314.37 ▼0.021.78 ▼0.3144.68 ▼1.83
Dashboard /wp-admin2,255 ▲675.97 ▲0.07155.21 ▲46.1840.11 ▲0.31
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0541.30 ▼1.3037.36 ▼0.77
Add New Post /wp-admin/post-new.php1,540 ▲1123.13 ▲5.01666.99 ▲23.2152.78 ▲1.58
Media Library /wp-admin/upload.php1,392 ▲44.21 ▲0.01102.30 ▲1.7545.80 ▼0.05
RP Simple Analytics /wp-admin/options-general.php?page=rp-simple-analytics1,0673.6894.1954.95

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 12 options in the database
    • rpsa_events
    • widget_theysaidso_widget
    • widget_recent-posts
    • rpsa_dashboard_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • rpsa_block_logged_in_users
    • rpsa_events_extra_js
    • rpsa_events_jquery
    • ...

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Donate link: Invalid URI ("")
You can look at the official readme.txt

rp-simple-analytics/rp-simple-analytics.php Passed 13 tests

The main PHP file in "Refined Practice - Simple Analytics Integration" ver. 1.2.0 adds more information about the plugin and also serves as the entry point for this plugin
97 characters long description:
Embeds the Simple Analytics privacy friendly analytics service (see https://simpleanalytics.com/)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected783 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP11220812667
JavaScript12414116

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity8.62
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods52
▷ Static methods23.85%
▷ Public methods4688.46%
▷ Protected methods00.00%
▷ Private methods611.54%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin