82% webeyez-analytics

Code Review | Webeyez Analytics

WordPress plugin Webeyez Analytics scored 82% from 54 tests.

About plugin

  • Plugin page: webeyez-analytics
  • Plugin version: 1.9.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.2
  • WordPress version: 5.8.1
  • First release: Aug 29, 2017
  • Latest release: Aug 6, 2019
  • Number of updates: 16
  • Update frequency: every 43.0 days
  • Top authors: webeyez (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 3,802 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.21MB] [CPU: ▼141.05ms] Passed 4 tests

Server-side resources used by Webeyez Analytics
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.04 ▲0.2042.40 ▲8.87
Dashboard /wp-admin3.33 ▲0.2744.06 ▼2.32
Posts /wp-admin/edit.php3.38 ▲0.2645.75 ▼5.61
Add New Post /wp-admin/post-new.php5.62 ▲0.1994.94 ▼561.39
Media Library /wp-admin/upload.php3.21 ▲0.2036.62 ▲5.14
Webeyez /wp-admin/options-general.php?page=webeyez3.1927.69

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 32 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Webeyez Analytics
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲7115.89 ▲0.2611.02 ▼0.3049.14 ▼1.30
Dashboard /wp-admin2,978 ▲415.83 ▼0.15138.51 ▼25.64107.21 ▼11.55
Posts /wp-admin/edit.php2,744 ▲52.71 ▼0.0167.23 ▼2.8394.11 ▼0.15
Add New Post /wp-admin/post-new.php1,607 ▼6518.68 ▼0.21372.69 ▼12.98109.40 ▼8.46
Media Library /wp-admin/upload.php1,812 ▲25.03 ▲0.02151.55 ▲8.17117.79 ▲1.24
Webeyez /wp-admin/options-general.php?page=webeyez1,1382.3760.2691.60

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=webeyez
    • > Notice in wp-content/plugins/webeyez-analytics/controllers/class-base-controller.php+145
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=webeyez
    • > Warning in wp-content/plugins/webeyez-analytics/controllers/class-base-controller.php+146
    Cannot modify header information - headers already sent by (output started at wp-admin/includes/misc.php:1281)

SRP 0% 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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/webeyez-analytics/index.php
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'Webeyez\\Controllers\\Base_Controller' not found in wp-content/plugins/webeyez-analytics/admin/settings-page.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Webeyez\\Controllers\\Base_Controller' not found in wp-content/plugins/webeyez-analytics/controllers/class-ajax.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Webeyez\\Controllers\\Base_Controller' not found in wp-content/plugins/webeyez-analytics/controllers/class-cart.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Webeyez\\Controllers\\Base_Controller' not found in wp-content/plugins/webeyez-analytics/controllers/class-error-pages.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Webeyez\\Controllers\\Base_Controller' not found in wp-content/plugins/webeyez-analytics/controllers/helpers/class-helper-checkout.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Webeyez\\Controllers\\Base_Controller' not found in wp-content/plugins/webeyez-analytics/templates/script.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Webeyez\\Controllers\\Base_Controller' not found in wp-content/plugins/webeyez-analytics/controllers/class-checkout.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Webeyez\\Controllers\\Base_Controller' not found in wp-content/plugins/webeyez-analytics/controllers/class-account.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Webeyez\\Controllers\\Base_Controller' not found in wp-content/plugins/webeyez-analytics/controllers/helpers/class-helper-cart.php:19

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Contributors: Contributors not specified
The official readme.txt is a good inspiration

webeyez-analytics/webeyez.php 85% from 13 tests

The primary PHP file in "Webeyez Analytics" version 1.9.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("webeyez-analytics.php" instead of "webeyez.php")

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
Success! There were no dangerous files found in this plugin1,406 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP213196781,161
CSS1460194
JavaScript16142
JSON2009

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity9.38
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.22
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods90
▷ Static methods55.56%
▷ Public methods8796.67%
▷ Protected methods22.22%
▷ Private methods11.11%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/bg_login.png11.27KB6.58KB▼ 41.57%
admin/img/user_icon.png2.24KB1.86KB▼ 16.78%
admin/img/logo.png9.00KB3.51KB▼ 61.00%
admin/img/reg_icon.png1.79KB1.12KB▼ 37.54%