89% promotore-simple-analytics

Code Review | Simple Analytics

WordPress plugin Simple Analytics scored89%from 54 tests.

About plugin

  • Plugin page: promotore-simple-...
  • Plugin version: 1.4.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.0.0
  • WordPress version: 6.3.1
  • First release: Jun 16, 2017
  • Latest release: May 18, 2022
  • Number of updates: 29
  • Update frequency: every 62.0 days
  • Top authors: lbonomo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,780 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.02MB] [CPU: ▼8.43ms] Passed 4 tests

An overview of server-side resources used by Simple Analytics
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.29 ▼4.92
Dashboard /wp-admin3.34 ▼0.0043.58 ▼16.98
Posts /wp-admin/edit.php3.39 ▲0.0449.13 ▲2.91
Add New Post /wp-admin/post-new.php5.92 ▲0.0479.24 ▼14.74
Media Library /wp-admin/upload.php3.26 ▲0.0434.93 ▲3.64
Simple Analytics /wp-admin/options-general.php?page=simple-analytics-settings3.2332.66

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Simple Analytics
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.59 ▼0.711.73 ▼0.2036.44 ▼6.74
Dashboard /wp-admin2,213 ▲255.85 ▲0.9099.35 ▼13.4040.28 ▼0.05
Posts /wp-admin/edit.php2,096 ▲102.04 ▲0.0040.22 ▲5.7035.27 ▼0.11
Add New Post /wp-admin/post-new.php1,517 ▼217.46 ▼5.58651.74 ▲45.3852.45 ▼4.87
Media Library /wp-admin/upload.php1,392 ▲44.20 ▲0.0196.20 ▼1.9544.15 ▲2.00
Simple Analytics /wp-admin/options-general.php?page=simple-analytics-settings8052.0223.9326.15

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Congratulations! This plugin passed the SRP test

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 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed: The official readme.txt is a good inspiration

promotore-simple-analytics/promotore-simple-analytics.php 92% from 13 tests

The main file in "Simple Analytics" v. 1.4.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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 detected166 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP746129166

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity2.20
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods12
▷ Static methods325.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin