84% zestatix

Code Review | zeStatix

WordPress plugin zeStatix scored 84% from 54 tests.

About plugin

  • Plugin page: zestatix
  • Plugin version: 1.1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Jul 10, 2020
  • Latest release: Dec 11, 2022
  • Number of updates: 41
  • Update frequency: every 21.8 days
  • Top authors: module4u (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 773 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.13MB] [CPU: ▼1.76ms] Passed 4 tests

This is a short check of server-side resources used by zeStatix
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0740.75 ▼6.68
Dashboard /wp-admin3.45 ▲0.1545.77 ▼0.98
Posts /wp-admin/edit.php3.56 ▲0.2148.72 ▲0.11
Add New Post /wp-admin/post-new.php6.03 ▲0.1597.70 ▲0.50
Media Library /wp-admin/upload.php3.37 ▲0.1539.23 ▲4.69
zeStatix /wp-admin/plugins.php?page=zestatix3.4235.54

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 22 new files
Database: 6 new tables, 8 new options
New tables
wp_zestatix_url
wp_zestatix_loaded
wp_zestatix_user
wp_zestatix_url_tracking
wp_zestatix_event
wp_zestatix_element
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
zestatix_toggle
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
zestatix_db_version

Browser metrics Passed 4 tests

A check of browser resources used by zeStatix
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.74 ▼0.641.56 ▼0.6637.89 ▼9.64
Dashboard /wp-admin2,207 ▲224.79 ▼0.04111.06 ▼6.5143.70 ▲1.61
Posts /wp-admin/edit.php2,090 ▲12.02 ▼0.0139.75 ▲4.0835.97 ▲2.76
Add New Post /wp-admin/post-new.php1,537 ▲1623.32 ▲0.18589.20 ▼63.3346.32 ▼9.65
Media Library /wp-admin/upload.php1,395 ▲104.20 ▼0.0798.75 ▼2.9642.16 ▼1.93
zeStatix /wp-admin/plugins.php?page=zestatix1,7191.9435.6630.82

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
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

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 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/zestatix/includes/table_example.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/zestatix/includes/settings.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/zestatix/includes/db_upgrade.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/zestatix/includes/html_settings.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/zestatix/includes/select.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: counter, statistics, click, track, tracking

zestatix/zestatix.php Passed 13 tests

The principal PHP file in "zeStatix" v. 1.1.0.2 is loaded by WordPress automatically on each request
59 characters long description:
Click statistics for any selected element of the site page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected3,719 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP107422033,469
PO File1111128250

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity2.94
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods16100.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions36
▷ Named functions3597.22%
▷ Anonymous functions12.78%
Constants4
▷ Global constants375.00%
▷ Class constants125.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/logo.png4.91KB4.73KB▼ 3.70%
img/toggle.png53.35KB14.65KB▼ 72.54%