79% wpsmartlook

Code Review | Smartlook

WordPress plugin Smartlook scored79%from 54 tests.

About plugin

  • Plugin page: wpsmartlook
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.1
  • WordPress version: 6.3.1
  • First release: May 10, 2016
  • Latest release: Feb 23, 2019
  • Number of updates: 27
  • Update frequency: every 37.7 days
  • Top authors: s3rgiosan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /4,370 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼5.58ms] Passed 4 tests

This is a short check of server-side resources used by Smartlook
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1344.39 ▲3.18
Dashboard /wp-admin3.44 ▲0.0953.74 ▼5.00
Posts /wp-admin/edit.php3.55 ▲0.1952.25 ▼5.79
Add New Post /wp-admin/post-new.php6.02 ▲0.1487.58 ▼14.70
Media Library /wp-admin/upload.php3.36 ▲0.1343.41 ▲3.27
Smartlook /wp-admin/options-general.php?page=smartlook3.3333.93

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 137 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Smartlook: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.72 ▲0.371.64 ▼0.2043.96 ▼2.38
Dashboard /wp-admin2,199 ▲225.58 ▼0.1399.48 ▲8.0642.01 ▲1.66
Posts /wp-admin/edit.php2,101 ▲11.98 ▼0.0239.03 ▲1.1334.83 ▼0.72
Add New Post /wp-admin/post-new.php6,233 ▲4,70726.11 ▲3.07954.15 ▲309.3062.47 ▲7.14
Media Library /wp-admin/upload.php1,404 ▲134.15 ▼0.01100.01 ▲1.4142.16 ▼1.94
Smartlook /wp-admin/options-general.php?page=smartlook7882.0223.1930.07

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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 task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wpsmartlook/tests/bootstrap.php
  • 92× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wpsmartlook/vendor/composer/installers/src/Composer/Installers/EliasisInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installer\\LibraryInstaller' not found in wp-content/plugins/wpsmartlook/vendor/composer/installers/src/Composer/Installers/Installer.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wpsmartlook/vendor/composer/installers/src/Composer/Installers/AttogramInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wpsmartlook/vendor/composer/installers/src/Composer/Installers/DecibelInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wpsmartlook/vendor/composer/installers/src/Composer/Installers/KanboardInstaller.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wpsmartlook/vendor/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wpsmartlook/vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wpsmartlook/vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wpsmartlook/vendor/composer/installers/src/Composer/Installers/CroogoInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wpsmartlook/vendor/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php:7

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)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: heatmaps, user, testing, recording, tracking...

wpsmartlook/wpsmartlook.php Passed 13 tests

Analyzing the main PHP file in "Smartlook" version 1.2.1
58 characters long description:
Easy integration of Smartlook into your WordPress website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin4,726 lines of code in 128 files:
LanguageFilesBlank linesComment linesLines of code
PHP1105328992,781
JSON6001,605
JavaScript747140
Bourne Shell12111123
XML311255
Markdown111022

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity2.91
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.36
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes101
▷ Abstract classes10.99%
▷ Concrete classes10099.01%
▷ Final classes00.00%
Methods147
▷ Static methods42.72%
▷ Public methods10470.75%
▷ Protected methods3121.09%
▷ Private methods128.16%
Functions10
▷ Named functions330.00%
▷ Anonymous functions770.00%
Constants4
▷ Global constants125.00%
▷ Class constants375.00%
▷ Public constants3100.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