94% jannes-mannes-google-analytics

Code Review | Jannes & Mannes Google Analytics

WordPress plugin Jannes & Mannes Google Analytics scored 94% from 54 tests.

About plugin

  • Plugin page: jannes-mannes-goo...
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.6
  • WordPress version: 5.9.2
  • First release: Oct 21, 2016
  • Latest release: Jan 25, 2019
  • Number of updates: 24
  • Update frequency: every 34.4 days
  • Top authors: jannesmannes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 1,019 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼293.23ms] Passed 4 tests

Analyzing server-side resources used by Jannes & Mannes Google Analytics
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0656.51 ▲0.99
Dashboard /wp-admin3.45 ▲0.0432.64 ▼1.11
Posts /wp-admin/edit.php3.68 ▲0.0436.25 ▼0.95
Add New Post /wp-admin/post-new.php6.92 ▼0.0593.53 ▼1,171.83
Media Library /wp-admin/upload.php3.34 ▲0.0425.82 ▲1.59

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Jannes & Mannes Google Analytics
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,783 ▲2516.17 ▲0.606.97 ▲0.862.16 ▼0.16
Dashboard /wp-admin2,908 ▲476.15 ▼0.02118.34 ▼35.22156.48 ▼4.38
Posts /wp-admin/edit.php2,708 ▲203.37 ▲0.1363.98 ▲3.18137.14 ▼3.63
Add New Post /wp-admin/post-new.php1,765 ▲10420.97 ▼1.30468.17 ▲42.52151.25 ▼3.38
Media Library /wp-admin/upload.php1,718 ▲235.44 ▲0.00137.84 ▼5.68187.51 ▲0.62

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function JmGoogleAnalytics\\add_action() in wp-content/plugins/jannes-mannes-google-analytics/JmGoogleAnalytics/Plugin.php:16

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

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
1 plugin tags: google-analytics

jannes-mannes-google-analytics/jm-google-analytics.php 92% from 13 tests

"Jannes & Mannes Google Analytics" version 1.3.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("jannes-mannes-google-analytics.php" instead of "jm-google-analytics.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin213 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP43939213

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity8.33
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity2.57
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods14
▷ Static methods14100.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.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
There are no PNG files in this plugin