10% stacksight

Code Review | Stacksight

WordPress plugin Stacksight scored10%from 54 tests.

About plugin

  • Plugin page: stacksight
  • Plugin version: 1.11.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.3
  • WordPress version: 6.3.1
  • First release: Aug 27, 2015
  • Latest release: Jan 31, 2017
  • Number of updates: 79
  • Update frequency: every 6.7 days
  • Top authors: igor-lemon (58.23%)liorkesos (30.38%)bora-89 (11.39%)zstolar (3.8%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10+ active /2,066 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/stacksight/wp-stacksight.php+1975
    Non-static method WPStackSightPlugin::addToQueue() should not be called statically

Server metrics [RAM: ▲0.43MB] [CPU: ▼4.18ms] Passed 4 tests

An overview of server-side resources used by Stacksight
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.86 ▲0.3937.66 ▼2.79
Dashboard /wp-admin3.79 ▲0.4946.67 ▼3.95
Posts /wp-admin/edit.php3.84 ▲0.4950.05 ▼5.64
Add New Post /wp-admin/post-new.php6.31 ▲0.4279.67 ▼4.33
Media Library /wp-admin/upload.php3.65 ▲0.4236.97 ▲0.30
Notice on Dashboard /wp-admin/options-general.php?page=sna-a-dashboard3.5933.39

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Stacksight
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7014.74 ▲0.361.66 ▼0.1041.32 ▼2.26
Dashboard /wp-admin2,225 ▲344.87 ▼0.01107.76 ▲1.7439.81 ▼4.38
Posts /wp-admin/edit.php2,105 ▲162.02 ▼0.1239.96 ▲2.9835.24 ▲1.97
Add New Post /wp-admin/post-new.php1,546 ▲1223.42 ▼0.06665.09 ▼12.8655.27 ▼3.03
Media Library /wp-admin/upload.php1,401 ▲164.23 ▲0.0496.39 ▼7.1440.75 ▼4.38
Notice on Dashboard /wp-admin/options-general.php?page=sna-a-dashboard7572.0222.3624.06

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=sna-a-dashboard
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'sna_show_notice_dashboard' not found or invalid function name

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/stacksight/wp-stacksight.php
  • 31× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      include_once(): Failed opening 'DRUPAL_ROOT/includes/database/database.inc' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/stacksight/stacksight-php-sdk/bootstrap-drupal-7.php on line 16
    • > PHP Warning
      Use of undefined constant DRUPAL_ROOT - assumed 'DRUPAL_ROOT' (this will throw an Error in a future version of PHP) in wp-content/plugins/stacksight/stacksight-php-sdk/bootstrap-drupal-8.php on line 47
    • > PHP Fatal error
      require_once(): Failed opening required 'DRUPAL_ROOT/core/includes/database.inc' (include_path='.:/usr/share/php') in wp-content/plugins/stacksight/stacksight-php-sdk/bootstrap-drupal-8.php on line 47
    • > PHP Warning
      include_once(DRUPAL_ROOT/includes/database/database.inc): failed to open stream: No such file or directory in wp-content/plugins/stacksight/stacksight-php-sdk/bootstrap-drupal-7.php on line 16
    • > PHP Warning
      include_once(): Failed opening 'DRUPAL_ROOT/includes/database/mysql/database.inc' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/stacksight/stacksight-php-sdk/bootstrap-drupal-7.php on line 18
    • > PHP Fatal error
      Uncaught Error: Class 'SSHttpRequest' not found in wp-content/plugins/stacksight/stacksight-php-sdk/requests/SSHttpRequestThread.php:3
    • > PHP Warning
      include_once(): Failed opening 'DRUPAL_ROOT/includes/database/pgsql/database.inc' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/stacksight/stacksight-php-sdk/bootstrap-drupal-7.php on line 19
    • > PHP Fatal error
      Uncaught Error: Class 'SSHttpRequest' not found in wp-content/plugins/stacksight/stacksight-php-sdk/requests/SSHttpRequestCurl.php:3
    • > PHP Warning
      include_once(): Failed opening 'DRUPAL_ROOT/includes/database/sqlite/database.inc' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/stacksight/stacksight-php-sdk/bootstrap-drupal-7.php on line 17
    • > PHP Fatal error
      Uncaught Error: Class 'SSClientBase' not found in wp-content/plugins/stacksight/stacksight-php-sdk/platforms/SSWordpressClient.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
The official readme.txt might help

stacksight/wp-stacksight.php 92% from 13 tests

"Stacksight" version 1.11.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("stacksight.php" instead of "wp-stacksight.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
Everything looks great! No dangerous files found in this plugin4,221 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP265091133,874
Markdown2710209
CSS162116
JSON10022

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.56
Average class complexity36.79
▷ Minimum class complexity1.00
▷ Maximum class complexity430.00
Average method complexity7.51
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces1
Interfaces1
Traits0
Classes23
▷ Abstract classes14.35%
▷ Concrete classes2295.65%
▷ Final classes00.00%
Methods138
▷ Static methods96.52%
▷ Public methods11079.71%
▷ Protected methods21.45%
▷ Private methods2618.84%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants109
▷ Global constants7064.22%
▷ Class constants3935.78%
▷ Public constants39100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.09MB with 0.07MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/config-screen.png93.03KB24.59KB▼ 73.56%