74% wp-etracker

Code Review | WP etracker

WordPress plugin WP etracker scored 74% from 54 tests.

About plugin

  • Plugin page: wp-etracker
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.3
  • WordPress version: 5.8.1
  • First release: Oct 18, 2017
  • Latest release: Dec 9, 2019
  • Number of updates: 23
  • Update frequency: every 35.1 days
  • Top authors: walljet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 2,005 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by WP etracker
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.97 ▲0.1451.22 ▲17.71
Dashboard /wp-admin3.20 ▲0.1451.05 ▲4.82
Posts /wp-admin/edit.php3.31 ▲0.2054.75 ▲7.34
Add New Post /wp-admin/post-new.php5.11 ▼0.3294.91 ▼555.79
Media Library /wp-admin/upload.php3.14 ▲0.1436.12 ▲4.29

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 58 new files
Database: no new tables, 8 new options
New WordPress options
wpetracker-area
wpetracker-page
wpetracker_area_class
posts_type
wpetracker-url
wpetracker_mod_id
opt_val_cat
wpetracker_page_class

Browser metrics Passed 4 tests

An overview of browser requirements for WP etracker
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,726 ▲13016.26 ▲0.6710.25 ▲0.1547.07 ▼1.37
Dashboard /wp-admin2,982 ▲516.02 ▲0.04148.04 ▼15.06123.43 ▼5.04
Posts /wp-admin/edit.php2,778 ▲392.72 ▼0.0165.96 ▼4.1389.88 ▼1.17
Add New Post /wp-admin/post-new.php3,034 ▲1,35121.41 ▲2.93596.12 ▲188.44119.72 ▲11.09
Media Library /wp-admin/upload.php1,775 ▼324.79 ▼0.24116.85 ▼30.23137.39 ▲21.35

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
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-includes/class-wp-hook.php+303
    Non-static method WpeTrackerActions::wpetracker_on_deactivate() should not be called statically
  • The uninstall procedure has failed, leaving 4 options in the database
    • wpetracker-page
    • opt_val_cat
    • wpetracker-area
    • posts_type

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
Even though everything seems fine, this is not 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
  • 11× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-etracker/views/headers.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_types() in wp-content/plugins/wp-etracker/views/index.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-etracker/views/pages/kaufkraft.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-etracker/views/pages/information.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-etracker/views/pages/dashboard.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wp-etracker/views/modules/banner.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-etracker/views/pages/hilfe.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_terms() in wp-content/plugins/wp-etracker/views/OptVal.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-etracker/views/meta_form_tax.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_terms() in wp-content/plugins/wp-etracker/views/OptVal.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: tracking, etracker analytics, analytics, etracker

wp-etracker/tracklet.php 85% from 13 tests

The main file in "WP etracker" v. 1.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-etracker.php" instead of "tracklet.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin4,305 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP163652561,379
CSS2131271,338
JavaScript9313215794
PO File1103107424
Markdown1620252
JSON300116
SVG2002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity22.40
▷ Minimum class complexity1.00
▷ Maximum class complexity63.00
Average method complexity3.82
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods38
▷ Static methods12.63%
▷ Public methods38100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
17 PNG files occupy 0.32MB with 0.23MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/check-icon.png1.16KB0.22KB▼ 80.91%
assets/images/ic_search.png17.47KB0.51KB▼ 97.05%
assets/images/wpetracker-plugin-logo.png4.97KB2.41KB▼ 51.52%
assets/images/logo-menu.png1.32KB0.81KB▼ 39.01%
assets/images/close-question.png17.66KB0.57KB▼ 96.79%