78% wp-send-to-analytics

Code Review | WP send to Analytics

WordPress plugin WP send to Analytics scored78%from 54 tests.

About plugin

  • Plugin page: wp-send-to-analytics
  • Plugin version: 1.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-4.8
  • WordPress version: 6.3.1
  • First release: Jun 30, 2017
  • Latest release: Jul 13, 2017
  • Number of updates: 9
  • Update frequency: every 1.4 days
  • Top authors: simone.p (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /721 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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼16.67ms] Passed 4 tests

This is a short check of server-side resources used by WP send to Analytics
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0723.36 ▼21.01
Dashboard /wp-admin3.32 ▼0.0248.83 ▼14.45
Posts /wp-admin/edit.php3.37 ▲0.0247.66 ▼6.04
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.23 ▼25.16
Media Library /wp-admin/upload.php3.25 ▲0.0238.55 ▲1.51

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for WP send to Analytics
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,889 ▲10313.51 ▼0.879.87 ▲7.8338.18 ▼4.57
Dashboard /wp-admin2,213 ▲335.65 ▼0.0389.78 ▼1.0539.07 ▼3.15
Posts /wp-admin/edit.php2,118 ▲182.04 ▼0.0235.41 ▲0.5732.21 ▼4.49
Add New Post /wp-admin/post-new.php1,527 ▼418.58 ▼4.42669.06 ▲11.1176.36 ▲14.51
Media Library /wp-admin/upload.php1,418 ▲184.25 ▲0.0593.28 ▼23.0342.37 ▼7.48

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-send-to-analytics/wps2a-settings-functions.php
    • > /wp-content/plugins/wp-send-to-analytics/wps2a-settings-page.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-send-to-analytics/enqueue.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-send-to-analytics/includes/inject.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-send-to-analytics/metabox/metabox-init.php:20

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 93% from 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
3 plugin tags: tracking, events, google analytics

wp-send-to-analytics/wps2a.php 85% from 13 tests

The main file in "WP send to Analytics" v. 1.1.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-send-to-analytics.php" instead of "wps2a.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin392 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP613039286
CSS11148
PO File18832
JavaScript110126

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
There are no PNG files in this plugin