73% stackcommerce-connect

Code Review | StackCommerce Connect

WordPress plugin StackCommerce Connect scored73%from 54 tests.

About plugin

  • Plugin page: stackcommerce-con...
  • Plugin version: 1.6.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.8
  • WordPress version: 6.3.1
  • First release: May 18, 2017
  • Latest release: May 17, 2018
  • Number of updates: 41
  • Update frequency: every 8.9 days
  • Top authors: stackcommerce (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,916 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.21MB] [CPU: ▼1.88ms] Passed 4 tests

An overview of server-side resources used by StackCommerce Connect
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1952.04 ▲6.52
Dashboard /wp-admin3.51 ▲0.2149.40 ▼0.78
Posts /wp-admin/edit.php3.63 ▲0.2751.11 ▲2.01
Add New Post /wp-admin/post-new.php6.11 ▲0.2385.05 ▼11.37
Media Library /wp-admin/upload.php3.44 ▲0.2139.53 ▲2.63
General Settings /wp-admin/admin.php?page=stackcommerce_wp_page_general_settings3.4236.08

Server storage [IO: ▲0.08MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 26 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
stackcommerce_wp_connection_status
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for StackCommerce Connect
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲7314.55 ▲0.201.90 ▲0.1053.32 ▲13.69
Dashboard /wp-admin2,240 ▲605.77 ▲0.1188.23 ▼2.9235.36 ▼5.70
Posts /wp-admin/edit.php2,145 ▲452.43 ▲0.4136.27 ▼3.3435.21 ▼0.47
Add New Post /wp-admin/post-new.php1,556 ▲2023.19 ▲0.28619.07 ▼20.7556.72 ▼0.20
Media Library /wp-admin/upload.php1,442 ▲454.33 ▲0.08100.34 ▼5.5440.56 ▼2.48
General Settings /wp-admin/admin.php?page=stackcommerce_wp_page_general_settings1,0681.9837.3141.09

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=stackcommerce_wp_page_general_settings
    • > Notice in wp-content/plugins/stackcommerce-connect/includes/class-stackcommerce-wp-settings.php+269
    Undefined offset: 0

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 fix the following items
  • 13× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/stackcommerce-connect/includes/class-stackcommerce-wp.php
    • > /wp-content/plugins/stackcommerce-connect/includes/class-stackcommerce-wp-maintenance.php
    • > /wp-content/plugins/stackcommerce-connect/includes/class-stackcommerce-wp-loader.php
    • > /wp-content/plugins/stackcommerce-connect/uninstall.php
    • > /wp-content/plugins/stackcommerce-connect/views/stackcommerce-wp-activate.php
    • > /wp-content/plugins/stackcommerce-connect/includes/class-stackcommerce-wp-article.php
    • > /wp-content/plugins/stackcommerce-connect/views/stackcommerce-wp-requirements-error.php
    • > /wp-content/plugins/stackcommerce-connect/includes/class-stackcommerce-wp-endpoint.php
    • > /wp-content/plugins/stackcommerce-connect/views/stackcommerce-wp-page-settings.php
    • > /wp-content/plugins/stackcommerce-connect/stackcommerce-connect.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/stackcommerce-connect/views/stackcommerce-wp-js.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 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
5 plugin tags: articles, stackcommerce, ecommerce, content, publishers

stackcommerce-connect/stackcommerce-connect.php Passed 13 tests

This is the main PHP file of "StackCommerce Connect" version 1.6.8, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
105 characters long description:
The Connect plugin by StackCommerce connects your WordPress CMS to the StackCommerce Articles repository.

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 plugin1,317 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP152894831,190
JavaScript2231121
SVG5005
CSS1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity19.12
▷ Minimum class complexity1.00
▷ Maximum class complexity52.00
Average method complexity3.69
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes112.50%
▷ Concrete classes787.50%
▷ Final classes00.00%
Methods54
▷ Static methods23.70%
▷ Public methods3462.96%
▷ Protected methods1629.63%
▷ Private methods47.41%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants654.55%
▷ Class constants545.45%
▷ Public constants5100.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