10% friendly-analytics

Code Review | Friendly Analytics

WordPress plugin Friendly Analytics scored10%from 54 tests.

About plugin

  • Plugin page: friendly-analytics
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.9
  • WordPress version: 6.3.1
  • First release: Apr 18, 2020
  • Latest release: Feb 2, 2022
  • Number of updates: 29
  • Update frequency: every 22.7 days
  • Top authors: stefanvetter (82.76%)friendlych (20.69%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /725 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • Install procedure had errors
    • > Parse error in wp-content/plugins/friendly-analytics/lib/Loader.php+148
    syntax error, unexpected end of file

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.54ms] Passed 4 tests

Server-side resources used by Friendly Analytics
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.68 ▼4.72
Dashboard /wp-admin3.31 ▲0.0044.36 ▼2.91
Posts /wp-admin/edit.php3.36 ▲0.0045.02 ▼1.39
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.38 ▼1.14
Media Library /wp-admin/upload.php3.23 ▲0.0034.97 ▲1.34

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 101 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Friendly Analytics
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.27 ▼1.091.83 ▲0.1341.38 ▼0.14
Dashboard /wp-admin2,206 ▲154.85 ▼0.17107.23 ▲1.6740.81 ▼0.83
Posts /wp-admin/edit.php2,089 ▼32.06 ▲0.0335.72 ▼1.2831.91 ▼3.33
Add New Post /wp-admin/post-new.php1,539 ▲2023.20 ▲0.21620.80 ▼104.1350.44 ▼7.43
Media Library /wp-admin/upload.php1,391 ▲94.21 ▲0.0595.63 ▼5.6240.25 ▼5.02

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • 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 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 73× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/friendly-analytics/vendor/composer/installers/src/Composer/Installers/ZendInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/friendly-analytics/vendor/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/friendly-analytics/vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/friendly-analytics/vendor/composer/installers/src/Composer/Installers/ImageCMSInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/friendly-analytics/vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/friendly-analytics/vendor/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/friendly-analytics/vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/friendly-analytics/vendor/composer/installers/src/Composer/Installers/DolibarrInstaller.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/friendly-analytics/vendor/composer/installers/src/Composer/Installers/DokuWikiInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/friendly-analytics/vendor/composer/installers/src/Composer/Installers/MagentoInstaller.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

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

The entry point to "Friendly Analytics" version 1.0.4 is a PHP file that has certain tags in its header comment area
131 characters long description:
Friendly Analytics is a professional web analytics solution that is friendly to your website visitors by respecting their privacy.

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
There were no executable files found in this plugin2,921 lines of code in 94 files:
LanguageFilesBlank linesComment linesLines of code
PHP864906162,162
PO File3104140548
JSON100111
JavaScript215649
CSS113634
YAML14017

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity2.84
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.46
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes79
▷ Abstract classes11.27%
▷ Concrete classes7898.73%
▷ Final classes11.28%
Methods102
▷ Static methods43.92%
▷ Public methods7472.55%
▷ Protected methods2322.55%
▷ Private methods54.90%
Functions7
▷ Named functions228.57%
▷ Anonymous functions571.43%
Constants4
▷ Global constants125.00%
▷ Class constants375.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin