84% simple-analytics

Code Review | Simple Analytics

WordPress plugin Simple Analytics scored84%from 54 tests.

About plugin

  • Plugin page: simple-analytics
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 1, 2013
  • Latest release: Apr 5, 2018
  • Number of updates: 16
  • Update frequency: every 106.7 days
  • Top authors: themeblvd (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

2,000+ active /24,141 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.04MB] [CPU: ▼4.05ms] Passed 4 tests

An overview of server-side resources used by Simple Analytics
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.07 ▼5.25
Dashboard /wp-admin3.34 ▲0.0449.16 ▼3.11
Posts /wp-admin/edit.php3.39 ▲0.0451.06 ▼1.12
Add New Post /wp-admin/post-new.php5.92 ▲0.0498.17 ▼5.32
Media Library /wp-admin/upload.php3.27 ▲0.0433.20 ▼2.52
Analytics /wp-admin/options-general.php?page=simple-analytics3.2333.78

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Analytics
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.25 ▼1.381.85 ▼0.0239.86 ▼3.44
Dashboard /wp-admin2,207 ▲195.83 ▼0.0396.17 ▼14.9237.25 ▼6.00
Posts /wp-admin/edit.php2,096 ▲42.02 ▲0.0338.74 ▲0.9435.41 ▲3.33
Add New Post /wp-admin/post-new.php1,538 ▲1023.12 ▲4.79650.33 ▼2.2658.69 ▲9.44
Media Library /wp-admin/upload.php1,383 ▼24.27 ▲0.0794.94 ▼6.9643.58 ▼2.46
Analytics /wp-admin/options-general.php?page=simple-analytics8652.0432.0039.05

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/simple-analytics/simple-analytics.php:31

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 Passed 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
6 plugin tags: tracking, theme blvd, jason bobich, analytics, google...

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

"Simple Analytics" version 1.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
58 characters long description:
A simple plugin to include your Google Analytics tracking.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin190 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP110593190

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity3.88
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods112.50%
▷ Public methods787.50%
▷ Protected methods00.00%
▷ Private methods112.50%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
No PNG images were found in this plugin