Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully
Server metrics [RAM: ▲0.00MB] [CPU: ▼8.69ms] Passed 4 tests
A check of server-side resources used by Add Google Analytics to WP
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.40 ▼0.06 | 23.91 ▼13.84 |
Dashboard /wp-admin | 3.33 ▲0.02 | 44.82 ▼0.98 |
Posts /wp-admin/edit.php | 3.38 ▲0.02 | 46.83 ▲3.18 |
Add New Post /wp-admin/post-new.php | 5.91 ▲0.02 | 79.66 ▼21.16 |
Media Library /wp-admin/upload.php | 3.25 ▲0.02 | 35.82 ▲1.21 |
Server storage [IO: ▲0.03MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 20 new files
Database: 1 new table, 7 new options
New tables |
---|
wp_m_analtics |
New WordPress options |
---|
widget_recent-comments |
widget_theysaidso_widget |
widget_recent-posts |
db_upgraded |
mdetector_datebase_version1.0 |
theysaidso_admin_options |
can_compress_scripts |
Browser metrics Passed 4 tests
An overview of browser requirements for Add Google Analytics to WP
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,830 ▲69 | 14.68 ▲0.31 | 1.79 ▲0.12 | 42.87 ▲5.03 |
Dashboard /wp-admin | 2,214 ▲40 | 5.58 ▲0.03 | 86.31 ▼2.71 | 37.02 ▼4.43 |
Posts /wp-admin/edit.php | 2,116 ▲13 | 2.02 ▲0.03 | 36.43 ▼4.15 | 34.31 ▼0.68 |
Add New Post /wp-admin/post-new.php | 1,547 ▲16 | 18.12 ▼5.00 | 619.13 ▲19.83 | 86.63 ▲23.42 |
Media Library /wp-admin/upload.php | 1,416 ▲13 | 4.19 ▲0.03 | 97.84 ▼4.22 | 42.61 ▼2.38 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
- The plugin did not uninstall successfully, leaving 1 table in the database
- wp_m_analtics
- Zombie WordPress options detected upon uninstall: 7 options
- can_compress_scripts
- theysaidso_admin_options
- mdetector_datebase_version1.0
- widget_theysaidso_widget
- widget_recent-comments
- widget_recent-posts
- db_upgraded
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
Even though no errors were found, this is by no means an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
- 7× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/add-google-analytics-to-wp/admin/ga-code-script.php:26
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/add-google-analytics-to-wp/meetanshi-google-analytics.php:25
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/add-google-analytics-to-wp/admin/meetanshi-google-analytics-admin.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/add-google-analytics-to-wp/admin/ga-admin.php:3
- > PHP Notice
Trying to get property 'prefix' of non-object in wp-content/plugins/add-google-analytics-to-wp/admin/meet-admin-form.php on line 4
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/add-google-analytics-to-wp/includes/meet-google-style.php:10
- > PHP Fatal error
Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/add-google-analytics-to-wp/admin/meet-admin-form.php:5
- > PHP Fatal error
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 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: ga plugin, meetanshi, google analytics plugin
add-google-analytics-to-wp/meetanshi-google-analytics.php 92% from 13 tests
The principal PHP file in "Add Google Analytics to WP" v. 1.0.1 is loaded by WordPress automatically on each request
It is important to fix the following:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("add-google-analytics-to-wp.php" instead of "meetanshi-google-analytics.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected480 lines of code in 15 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 13 | 64 | 115 | 475 |
CSS | 1 | 0 | 0 | 4 |
JavaScript | 1 | 0 | 0 | 1 |
PHP code Passed 2 tests
A brief analysis 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 code | 0.10 |
Average class complexity | 1.67 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 3.00 |
Average method complexity | 1.22 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 3.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 6 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 6 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 18 | |
▷ Static methods | 3 | 16.67% |
▷ Public methods | 13 | 72.22% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 27.78% |
Functions | 11 | |
▷ Named functions | 11 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 3 | |
▷ Global constants | 3 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected