84% myanalytics

Code Review | MyAnalytics

WordPress plugin MyAnalytics scored 84% from 54 tests.

About plugin

  • Plugin page: myanalytics
  • Plugin version: 7.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.7
  • WordPress version: 6.3.1
  • First release: Mar 8, 2017
  • Latest release: Apr 14, 2021
  • Number of updates: 35
  • Update frequency: every 42.6 days
  • Top authors: tombgtn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active / 1,164 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼0.58ms] Passed 4 tests

Analyzing server-side resources used by MyAnalytics
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0643.86 ▼2.94
Dashboard /wp-admin3.35 ▲0.0551.03 ▼1.84
Posts /wp-admin/edit.php3.47 ▲0.1156.38 ▲1.23
Add New Post /wp-admin/post-new.php5.93 ▲0.05103.21 ▲1.22
Media Library /wp-admin/upload.php3.28 ▲0.0540.70 ▲5.13
MyAnalytics /wp-admin/options-general.php?page=myanalytics3.2440.47

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by MyAnalytics
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲2313.27 ▼0.435.84 ▲4.1140.83 ▲2.16
Dashboard /wp-admin2,213 ▲74.84 ▼1.03110.70 ▲4.1141.66 ▲3.71
Posts /wp-admin/edit.php2,093 ▲11.99 ▼0.0639.95 ▲0.5534.73 ▼0.92
Add New Post /wp-admin/post-new.php1,517 ▼1917.76 ▼5.37594.33 ▼11.6649.77 ▼0.63
Media Library /wp-admin/upload.php1,389 ▲74.13 ▼0.1197.78 ▼2.3746.20 ▲4.52
MyAnalytics /wp-admin/options-general.php?page=myanalytics8482.0626.5429.36

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 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
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/myanalytics/myanalytics.php:112

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 Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: google, cookies, cnil, dnt, rgpd...

myanalytics/myanalytics.php Passed 13 tests

The entry point to "MyAnalytics" version 7.0.1 is a PHP file that has certain tags in its header comment area
90 characters long description:
Affiche le tag Google Analytics ainsi que le message d'obligation légale sur les cookies.

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
Good job! No executable or dangerous file extensions detected293 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript12411141
PHP12310114
PO File19938

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.35
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%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin