83% easy-analytics-tracking

Code Review | Easy Analytics Tracking

WordPress plugin Easy Analytics Tracking scored83%from 54 tests.

About plugin

  • Plugin page: easy-analytics-tr...
  • Plugin version: 1.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.4
  • WordPress version: 6.3.1
  • First release: May 21, 2020
  • Latest release: May 22, 2020
  • Number of updates: 5
  • Update frequency: every 3.0 days
  • Top authors: emorales15b (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /493 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.43ms] Passed 4 tests

This is a short check of server-side resources used by Easy Analytics Tracking
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0132.84 ▼10.38
Dashboard /wp-admin3.32 ▲0.0245.18 ▼2.64
Posts /wp-admin/edit.php3.37 ▲0.0245.98 ▼0.35
Add New Post /wp-admin/post-new.php5.90 ▲0.0285.69 ▼0.36
Media Library /wp-admin/upload.php3.24 ▲0.0134.62 ▲2.12
Easy Analytics Tracking /wp-admin/admin.php?page=easyanalyticstracking3.2227.40
Credits /wp-admin/admin.php?page=easyanalyticstracking-credits3.2128.08

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Easy Analytics Tracking
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,851 ▲11613.25 ▼0.984.00 ▲2.1540.84 ▼5.09
Dashboard /wp-admin2,235 ▲475.79 ▼0.27110.71 ▲8.1386.69 ▲44.81
Posts /wp-admin/edit.php2,115 ▲261.97 ▼0.0237.35 ▼3.7735.51 ▼3.81
Add New Post /wp-admin/post-new.php1,547 ▲518.22 ▲0.18693.32 ▲59.8656.95 ▲4.38
Media Library /wp-admin/upload.php1,417 ▲294.18 ▲0.00104.77 ▲10.8180.20 ▲37.98
Easy Analytics Tracking /wp-admin/admin.php?page=easyanalyticstracking9481.8933.2137.36
Credits /wp-admin/admin.php?page=easyanalyticstracking-credits8422.0724.1238.45

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
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 wp_register_style() in wp-content/plugins/easy-analytics-tracking/admin/includes/credits.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-analytics-tracking/admin/admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-analytics-tracking/admin/includes/ajax/ajax.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-analytics-tracking/admin/includes/ajax/ajax.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/easy-analytics-tracking/admin/includes/dashboard.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention: You can take inspiration from this readme.txt

easy-analytics-tracking/easyanalyticstracking.php 77% from 13 tests

The main PHP file in "Easy Analytics Tracking" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("easy-analytics-tracking.php" instead of "easyanalyticstracking.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: Keep the plugin description shorter than 140 characters (currently 166 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected441 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
CSS2544212
PHP58616187
JavaScript215041
SVG1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
5 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/includes/images/how_1.png1.87KB1.17KB▼ 37.38%
admin/includes/images/how_2.png1.25KB0.31KB▼ 75.41%
admin/includes/images/logoea.png4.25KB2.01KB▼ 52.76%
admin/includes/images/eat_coffee.png1.96KB1.33KB▼ 32.25%
admin/includes/images/icon_menu.png1.68KB0.95KB▼ 43.73%