78% sitepack-connect

Code Review | SitePack Connect

WordPress plugin SitePack Connect scored78%from 54 tests.

About plugin

  • Plugin page: sitepack-connect
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.4
  • WordPress version: 6.3.1
  • First release: Apr 1, 2023
  • Latest release: Nov 22, 2023
  • Number of updates: 24
  • Update frequency: every 9.8 days
  • Top authors: sitepack (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /277 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.18MB] [CPU: ▼5.19ms] Passed 4 tests

This is a short check of server-side resources used by SitePack Connect
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1840.38 ▲1.92
Dashboard /wp-admin3.55 ▲0.2048.48 ▼12.13
Posts /wp-admin/edit.php3.60 ▲0.2447.63 ▼3.78
Add New Post /wp-admin/post-new.php6.07 ▲0.1894.37 ▼5.05
Media Library /wp-admin/upload.php3.41 ▲0.1837.16 ▲0.20

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

SitePack Connect: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,919 ▲15713.41 ▼0.947.56 ▲5.8536.39 ▼4.64
Dashboard /wp-admin2,216 ▲425.62 ▼0.0393.41 ▼2.9442.33 ▼5.06
Posts /wp-admin/edit.php2,121 ▲212.00 ▲0.0641.04 ▼1.4536.16 ▼0.53
Add New Post /wp-admin/post-new.php1,541 ▲523.18 ▼0.26607.59 ▼67.2656.38 ▲3.22
Media Library /wp-admin/upload.php1,419 ▲194.23 ▲0.0295.88 ▼0.1840.71 ▼3.27

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • 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
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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/sitepack-connect/sitepack-connect.php
  • 16× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      include(): Failed opening 'SITEPACK_CONNECT_PLUGIN_DIRmodels/class.sitepack-stock-location.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/sitepack-connect/class.sitepack-connect.php on line 4
    • > PHP Warning
      Use of undefined constant SITEPACK_CONNECT_PLUGIN_DIR - assumed 'SITEPACK_CONNECT_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/sitepack-connect/services/class.sitepack-woocommerce.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'SITEPACK_CONNECT_PLUGIN_DIRservices/class.sitepack-woocommerce.php' (include_path='.:/usr/share/php') in wp-content/plugins/sitepack-connect/class.sitepack-connect-rest-api.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'SITEPACK_CONNECT_PLUGIN_DIRservices/class.sitepack-woocommerce.php' (include_path='.:/usr/share/php') in wp-content/plugins/sitepack-connect/class.sitepack-connect-stock.php on line 3
    • > PHP Warning
      Use of undefined constant SITEPACK_CONNECT_PLUGIN_DIR - assumed 'SITEPACK_CONNECT_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/sitepack-connect/class.sitepack-connect.php on line 4
    • > PHP Warning
      include(SITEPACK_CONNECT_PLUGIN_DIRmodels/class.sitepack-stock.php): failed to open stream: No such file or directory in wp-content/plugins/sitepack-connect/class.sitepack-connect.php on line 3
    • > PHP Warning
      require_once(SITEPACK_CONNECT_PLUGIN_DIRmodels/class.sitepack-category.php): failed to open stream: No such file or directory in wp-content/plugins/sitepack-connect/services/class.sitepack-woocommerce.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/sitepack-connect/views/sitepack_dashboard.php:4
    • > PHP Warning
      include(): Failed opening 'SITEPACK_CONNECT_PLUGIN_DIRmodels/class.sitepack-stock.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/sitepack-connect/class.sitepack-connect.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'SITEPACK_CONNECT_PLUGIN_DIRmodels/class.sitepack-category.php' (include_path='.:/usr/share/php') in wp-content/plugins/sitepack-connect/services/class.sitepack-woocommerce.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
5 plugin tags: sitepack, connect, cyclesoftware, wilmar, woocommerce

sitepack-connect/sitepack-connect.php 85% from 13 tests

The main PHP script in "SitePack Connect" version 1.2.3 is automatically included on every request by WordPress
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 168 characters long)
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin1,485 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP132221371,201
CSS2460257
JavaScript14027

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity9.33
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods71
▷ Static methods68.45%
▷ Public methods6287.32%
▷ Protected methods00.00%
▷ Private methods912.68%
Functions6
▷ Named functions350.00%
▷ Anonymous functions350.00%
Constants7
▷ Global constants457.14%
▷ Class constants342.86%
▷ 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
4 PNG files occupy 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon_full_120x120.png12.26KB5.21KB▼ 57.47%
images/icon_full_32x32.png5.83KB1.72KB▼ 70.49%
images/icon_full_48x48.png15.69KB2.25KB▼ 85.69%
images/logo_transparent_45.png11.10KB2.74KB▼ 75.35%