68% finteza-analytics

Code Review | Finteza Analytics

WordPress plugin Finteza Analytics scored68%from 54 tests.

About plugin

  • Plugin page: finteza-analytics
  • Plugin version: 1.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8
  • WordPress version: 6.3.1
  • First release: Jan 7, 2019
  • Latest release: Jul 26, 2021
  • Number of updates: 25
  • Update frequency: every 37.8 days
  • Top authors: finteza (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /8,765 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼1.18MB] [CPU: ▼48.74ms] Passed 4 tests

Analyzing server-side resources used by Finteza Analytics
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.81 ▼0.6622.23 ▼23.50
Dashboard /wp-admin2.85 ▼0.5017.71 ▼46.25
Posts /wp-admin/edit.php2.85 ▼0.5120.06 ▼30.92
Add New Post /wp-admin/post-new.php2.85 ▼3.0417.13 ▼94.29
Media Library /wp-admin/upload.php2.85 ▼0.3819.16 ▼17.19
Finteza Analytics /wp-admin/options-general.php?page=finteza_settings2.8517.89

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Finteza Analytics
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6214.47 ▼0.161.83 ▲0.1442.11 ▲3.79
Dashboard /wp-admin2,211 ▲225.85 ▲0.8896.01 ▼20.7336.43 ▼9.47
Posts /wp-admin/edit.php2,097 ▲82.03 ▲0.0438.74 ▼0.4036.91 ▲3.22
Add New Post /wp-admin/post-new.php1,534 ▲2023.22 ▲5.72623.82 ▲28.2951.21 ▲2.48
Media Library /wp-admin/upload.php1,399 ▲114.26 ▲0.09107.85 ▲11.9546.04 ▲5.70
Finteza Analytics /wp-admin/options-general.php?page=finteza_settings1,1012.0426.5733.36

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/finteza-analytics/finteza-analytics.php+55
    Trying to access array offset on value of type bool
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=finteza_settings
    • > Notice in wp-content/plugins/finteza-analytics/inc/input-settings.php+8
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/finteza-analytics/finteza-analytics.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/finteza-analytics/tr/main.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 18 tag instead of maximum 10
You can take inspiration from this readme.txt

finteza-analytics/finteza-analytics.php 92% from 13 tests

Analyzing the main PHP file in "Finteza Analytics" version 1.3
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin1,573 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP8164244736
PO File3141150626
JavaScript21817117
CSS112177
HTML10010
SVG3007

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity49.00
▷ Minimum class complexity35.00
▷ Maximum class complexity63.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods24
▷ Static methods729.17%
▷ Public methods1770.83%
▷ Protected methods00.00%
▷ Private methods729.17%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants1178.57%
▷ Class constants321.43%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin