83% simpleanalytics

Code Review | Simple Analytics

WordPress plugin Simple Analytics scored83%from 54 tests.

About plugin

  • Plugin page: simpleanalytics
  • Plugin version: 1.16
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jun 12, 2019
  • Latest release: Nov 13, 2023
  • Number of updates: 25
  • Update frequency: every 65.1 days
  • Top authors: simpleanalytics (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

700+ active /7,680 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.01MB] [CPU: ▼5.50ms] Passed 4 tests

Analyzing server-side resources used by Simple Analytics
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0240.14 ▲4.41
Dashboard /wp-admin3.33 ▼0.0249.79 ▼12.52
Posts /wp-admin/edit.php3.38 ▲0.0246.41 ▲1.76
Add New Post /wp-admin/post-new.php5.91 ▲0.0289.56 ▼12.91
Media Library /wp-admin/upload.php3.25 ▲0.0235.37 ▲1.69
Simple Analytics /wp-admin/options-general.php?page=simple-analytics-settings3.2230.79

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Analytics
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲5813.98 ▼0.092.00 ▲0.4643.55 ▲5.78
Dashboard /wp-admin2,198 ▲235.51 ▼0.1993.56 ▼26.4041.71 ▼1.20
Posts /wp-admin/edit.php2,106 ▲92.03 ▲0.0936.89 ▲1.7837.82 ▲5.31
Add New Post /wp-admin/post-new.php1,531 ▲523.04 ▼0.00589.85 ▼73.7548.05 ▼15.98
Media Library /wp-admin/upload.php1,409 ▲94.21 ▼0.0196.77 ▼12.1542.12 ▼2.16
Simple Analytics /wp-admin/options-general.php?page=simple-analytics-settings8052.0024.7725.37

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=simple-analytics-settings
    • > Console-api (warning) in wp-content/plugins/simpleanalytics/public/js/admins.js+0:8
    Simple Analytics: Not logging requests from admins

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed: Please take inspiration from this readme.txt

simpleanalytics/simple-analytics.php 69% from 13 tests

The principal PHP file in "Simple Analytics" v. 1.16 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/lang/")
  • Requires at least: Required version does not match the one declared in readme.txt ("2.0" instead of "2.0.0")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("simpleanalytics.php" instead of "simple-analytics.php")

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
Everything looks great! No dangerous files found in this plugin142 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP4212889
Bourne Shell1141242
Markdown1509
JavaScript1001
SVG1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
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
9 compressed PNG files occupy 0.34MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png0.40KB0.42KB0.00%
assets/screenshot-2.png63.37KB69.90KB0.00%
assets/screenshot-3.png80.30KB87.35KB0.00%
assets/icon-128x128.png0.24KB0.25KB0.00%
assets/banner-1880x609.png8.05KB8.90KB0.00%