73% traki-analytics

Code Review | Traki Analytics

WordPress plugin Traki Analytics scored73%from 54 tests.

About plugin

  • Plugin page: traki-analytics
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7.5
  • WordPress version: 6.3.1
  • First release: May 22, 2017
  • Latest release: May 22, 2017
  • Number of updates: 12
  • Update frequency: every 0.3 days
  • Top authors: aidanayalabigg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /707 total downloads

Benchmarks

Plugin footprint 83% from 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 gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼7.61ms] Passed 4 tests

Analyzing server-side resources used by Traki Analytics
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0427.12 ▼12.17
Dashboard /wp-admin3.37 ▲0.0644.25 ▼1.63
Posts /wp-admin/edit.php3.48 ▲0.1261.26 ▲15.14
Add New Post /wp-admin/post-new.php5.97 ▲0.0880.77 ▼14.93
Media Library /wp-admin/upload.php3.29 ▲0.0632.99 ▼1.71
Traki Analytics /wp-admin/options-general.php?page=traki-analytics3.2628.71

Server storage [IO: ▲0.05MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Traki Analytics: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6213.67 ▼1.111.85 ▲0.1245.93 ▲5.64
Dashboard /wp-admin2,211 ▲235.84 ▲0.94103.66 ▼18.5136.80 ▼9.59
Posts /wp-admin/edit.php2,097 ▲52.05 ▼0.0040.26 ▲0.0236.47 ▲2.65
Add New Post /wp-admin/post-new.php1,524 ▼1117.86 ▼5.22668.03 ▲19.4658.45 ▲4.14
Media Library /wp-admin/upload.php1,399 ▲144.21 ▼0.04110.25 ▲6.6947.02 ▲3.52
Traki Analytics /wp-admin/options-general.php?page=traki-analytics7942.0623.1026.25

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=traki-analytics
    • > Notice in wp-content/plugins/traki-analytics/admin/partials/traki-analytics-admin-display.php+26
    Trying to access array offset on value of type bool

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
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/traki-analytics/public/partials/traki-analytics-public-display.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/traki-analytics/admin/partials/traki-analytics-admin-display.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid URI found ("www.traki.co.uk")
Please take inspiration from this readme.txt

traki-analytics/traki-analytics.php Passed 13 tests

"Traki Analytics" version 1.0.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
121 characters long description:
Website analytics you'll actually understand. This plugin allows you to link up your WordPress site with Traki Analytics.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin264 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12143549258
JavaScript24546
CSS2080

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity2.57
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.38
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods29
▷ Static methods26.90%
▷ Public methods2482.76%
▷ Protected methods00.00%
▷ Private methods517.24%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin