10% smarter-analytics

Code Review | Smarter Analytics

WordPress plugin Smarter Analytics scored 10% from 54 tests.

About plugin

  • Plugin page: smarter-analytics
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.7.1
  • WordPress version: 6.3.1
  • First release: Sep 30, 2013
  • Latest release: Jan 25, 2017
  • Number of updates: 8
  • Update frequency: every 151.8 days
  • Top authors: AcumenConsulting (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,791 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/smarter-analytics/smarter-analytics.php+27
    Undefined index: reset

Server metrics [RAM: ▼1.90MB] [CPU: ▼51.10ms] Passed 4 tests

A check of server-side resources used by Smarter Analytics
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.07 ▲0.67
Dashboard /wp-admin2.05 ▼1.265.64 ▼42.91
Posts /wp-admin/edit.php2.05 ▼1.315.41 ▼37.48
Add New Post /wp-admin/post-new.php2.05 ▼3.844.91 ▼92.40
Media Library /wp-admin/upload.php2.05 ▼1.185.11 ▼31.61
Smarter Analytics /wp-admin/options-general.php?page=smarter-analytics-admin2.055.11

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Smarter Analytics
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲7214.45 ▲0.031.78 ▲0.0845.63 ▲1.51
Dashboard /wp-admin2,216 ▲274.85 ▼0.13111.16 ▲3.3043.05 ▲1.95
Posts /wp-admin/edit.php2,096 ▲42.05 ▲0.0135.00 ▼2.1331.54 ▲0.34
Add New Post /wp-admin/post-new.php6,497 ▲4,96423.13 ▲0.13824.85 ▲134.6358.92 ▼1.28
Media Library /wp-admin/upload.php1,395 ▲104.15 ▼0.2192.09 ▼14.1841.95 ▼2.56
Smarter Analytics /wp-admin/options-general.php?page=smarter-analytics-admin1,0571.8425.2134.73

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/smarter-analytics/smarter-analytics.php+27
    Undefined index: reset
  • The plugin did not uninstall successfully, leaving 7 files (0.03MB) in the plugin directory
    • (new file) uninstall.php
    • (new file) smarter-analytics-add-metabox.php
    • (new file) smarter-analytics-posts-view-actions.php
    • (new file) readme.txt
    • (new file) smarter-analytics-admin.php
    • (new file) smarter-analytics.php
    • (new file) smarter-analytics.js
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • recovery_mode_email_last_sent

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=smarter-analytics-admin
    • > Notice in wp-content/plugins/smarter-analytics/smarter-analytics.php+27
    Undefined index: reset
    • > GET request to /wp-admin/options-general.php?page=smarter-analytics-admin
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=smarter-analytics-admin
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=smarter-analytics-admin
    • > Notice in wp-content/plugins/smarter-analytics/smarter-analytics-admin.php+160
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smarter-analytics/smarter-analytics-posts-view-actions.php:2
    • > PHP Parse error
      syntax error, unexpected '&&' (T_BOOLEAN_AND) in wp-content/plugins/smarter-analytics/uninstall.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smarter-analytics/smarter-analytics-add-metabox.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smarter-analytics/smarter-analytics-admin.php:313
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smarter-analytics/smarter-analytics-posts-view-actions.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: analytics, smarter analytics, google analytics

smarter-analytics/smarter-analytics.php 92% from 13 tests

Analyzing the main PHP file in "Smarter Analytics" version 2.0
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 231 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin609 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP510259455
JavaScript1400154

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity1.62
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods1392.86%
▷ Protected methods00.00%
▷ Private methods17.14%
Functions8
▷ Named functions8100.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
There are no PNG files in this plugin