83% storecontrl-wp-connection

Code Review | StoreContrl Woocommerce

WordPress plugin StoreContrl Woocommerce scored83%from 54 tests.

About plugin

  • Plugin page: storecontrl-wp-co...
  • Plugin version: 4.0.8
  • PHP compatiblity: 0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 1.6.1-6.4.1
  • WordPress version: 6.3.1
  • First release: Oct 20, 2021
  • Latest release: Nov 30, 2023
  • Number of updates: 16
  • Update frequency: every 106.2 days
  • Top authors: arture (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /904 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.04MB] [CPU: ▲2.21ms] Passed 4 tests

Server-side resources used by StoreContrl Woocommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.47 ▲1.0143.95 ▲4.45
Dashboard /wp-admin4.37 ▲1.0252.75 ▼10.62
Posts /wp-admin/edit.php4.42 ▲1.0654.70 ▲6.93
Add New Post /wp-admin/post-new.php6.97 ▲1.08107.87 ▲8.08
Media Library /wp-admin/upload.php4.29 ▲1.0644.14 ▲9.40

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for StoreContrl Woocommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,877 ▲11514.68 ▼0.081.71 ▲0.0336.41 ▼7.60
Dashboard /wp-admin2,267 ▲935.59 ▲0.0094.55 ▼6.79101.87 ▲55.69
Posts /wp-admin/edit.php2,188 ▲882.01 ▲0.0646.91 ▲9.9347.68 ▲10.98
Add New Post /wp-admin/post-new.php1,522 ▼418.55 ▼4.34684.62 ▼72.2642.58 ▼12.19
Media Library /wp-admin/upload.php1,484 ▲844.23 ▲0.04102.22 ▲6.1981.92 ▲39.34

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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 fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/storecontrl-wp-connection/includes/admin/partials/storecontrl_wp_connection_settings_page.php:2

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (API instellingen), #2 (Configuratie instellingen), #3 (Status en logging)
The official readme.txt is a good inspiration

storecontrl-wp-connection/storecontrl-wp-connection.php 92% from 13 tests

Analyzing the main PHP file in "StoreContrl Woocommerce" version 4.0.8
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 309 characters long)

Code Analysis 97% from 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
Success! There were no dangerous files found in this plugin6,334 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP121,1615185,251
PO File1174235537
CSS53026280
JavaScript67852265
SVG1001

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
The following items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 118)
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity103.30
▷ Minimum class complexity1.00
▷ Maximum class complexity368.00
Average method complexity7.31
▷ Minimum method complexity1.00
▷ Maximum method complexity118.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods159
▷ Static methods00.00%
▷ Public methods14792.45%
▷ Protected methods00.00%
▷ Private methods127.55%
Functions8
▷ Named functions675.00%
▷ Anonymous functions225.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.35MB with 0.24MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/admin/img/screenshot_2.png137.85KB46.08KB▼ 66.58%
includes/admin/img/screenshot_1.png97.74KB28.71KB▼ 70.63%
includes/admin/img/screenshot_3.png122.62KB41.68KB▼ 66.01%