79% easy-javascript-analytics-goals

Code Review | Easy Javascript Analytics Goals

WordPress plugin Easy Javascript Analytics Goals scored79%from 54 tests.

About plugin

  • Plugin page: easy-javascript-a...
  • Plugin version: 1.0.6
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.9
  • WordPress version: 6.3.1
  • First release: Jul 28, 2021
  • Latest release: Jan 31, 2022
  • Number of updates: 8
  • Update frequency: every 23.4 days
  • Top authors: neteuro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /535 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼12.48ms] Passed 4 tests

Server-side resources used by Easy Javascript Analytics Goals
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0843.96 ▲4.65
Dashboard /wp-admin3.38 ▲0.0351.58 ▼16.72
Posts /wp-admin/edit.php3.49 ▲0.1349.56 ▼6.25
Add New Post /wp-admin/post-new.php5.98 ▲0.0984.16 ▼23.81
Media Library /wp-admin/upload.php3.30 ▲0.0736.40 ▼3.14
Easy JS Analytics Goals /wp-admin/tools.php?page=easy-javascript-analytics-goals3.2935.01

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 8 new options
New WordPress options
ejag_goals
widget_recent-comments
widget_theysaidso_widget
ejag_configured
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy Javascript Analytics Goals
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,915 ▲15413.80 ▼0.479.11 ▲7.5144.01 ▲4.66
Dashboard /wp-admin2,206 ▲295.65 ▲0.1284.36 ▼5.0937.93 ▼9.31
Posts /wp-admin/edit.php2,111 ▲112.00 ▲0.0436.21 ▼6.3633.24 ▼8.04
Add New Post /wp-admin/post-new.php1,536 ▲1023.54 ▲0.33651.15 ▲7.0853.88 ▲1.48
Media Library /wp-admin/upload.php1,408 ▲84.19 ▲0.0399.15 ▼5.5639.05 ▼8.91
Easy JS Analytics Goals /wp-admin/tools.php?page=easy-javascript-analytics-goals1,0852.0627.3937.21

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_theysaidso_widget
    • ejag_goals
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • ejag_configured
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/easy-javascript-analytics-goals/public/partials/easy-javascript-analytics-goals-public-display.php
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      include_once(ANALYTICS_GOALS_PLUGIN_PATHadmin/includes/inc.php): failed to open stream: No such file or directory in wp-content/plugins/easy-javascript-analytics-goals/admin/class-easy-javascript-analytics-goals-admin.php on line 24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-javascript-analytics-goals/public/class-easy-javascript-analytics-goals-public.php:129
    • > PHP Warning
      Use of undefined constant ANALYTICS_GOALS_PLUGIN_PATH - assumed 'ANALYTICS_GOALS_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/easy-javascript-analytics-goals/admin/class-easy-javascript-analytics-goals-admin.php on line 24
    • > PHP Warning
      include_once(): Failed opening 'ANALYTICS_GOALS_PLUGIN_PATHadmin/includes/inc.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/easy-javascript-analytics-goals/admin/class-easy-javascript-analytics-goals-admin.php on line 24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/easy-javascript-analytics-goals/admin/partials/easy-javascript-analytics-goals-admin-display.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: goals, analytics, javascript, jquery

easy-javascript-analytics-goals/easy-javascript-analytics-goals.php Passed 13 tests

This is the main PHP file of "Easy Javascript Analytics Goals" version 1.0.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
44 characters long description:
Setup javascript with google analytics goals

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin598 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP14151536365
JavaScript26227158
CSS211475

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity1.57
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.14
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods28
▷ Static methods310.71%
▷ Public methods2382.14%
▷ Protected methods00.00%
▷ Private methods517.86%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
No PNG images were found in this plugin