84% janio-store-connector

Code Review | Janio Store Connector

WordPress plugin Janio Store Connector scored84%from 54 tests.

About plugin

  • Plugin page: janio-store-conne...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Mar 16, 2023
  • Latest release: Mar 24, 2023
  • Number of updates: 5
  • Update frequency: every 1.6 days
  • Top authors: janiointegration (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /283 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.00MB] [CPU: ▼6.04ms] Passed 4 tests

Server-side resources used by Janio Store Connector
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.50 ▲3.26
Dashboard /wp-admin3.31 ▲0.0043.46 ▼6.66
Posts /wp-admin/edit.php3.36 ▲0.0045.56 ▼2.91
Add New Post /wp-admin/post-new.php5.89 ▲0.0079.43 ▼14.46
Media Library /wp-admin/upload.php3.23 ▲0.0031.95 ▼0.13

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Janio Store Connector
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.65 ▲0.291.60 ▲0.0141.92 ▼3.06
Dashboard /wp-admin2,198 ▲215.64 ▼0.0390.07 ▲3.3639.68 ▼0.92
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0139.66 ▲0.7135.21 ▲2.10
Add New Post /wp-admin/post-new.php1,528 ▼023.31 ▲0.32662.81 ▲45.2252.91 ▼4.15
Media Library /wp-admin/upload.php1,400 ▲34.17 ▼0.0596.18 ▼0.3244.31 ▲3.75

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% 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
Please fix the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/janio-store-connector/worker.php
    • > /wp-content/plugins/janio-store-connector/connectorMain.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
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 uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === janio-store-connector === )
You can look at the official readme.txt

janio-store-connector/connectorMain.php 92% from 13 tests

This is the main PHP file of "Janio Store Connector" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("janio-store-connector.php" instead of "connectorMain.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin2,708 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP95385942,402
CSS1220186
JavaScript1200120

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.44
Average class complexity17.71
▷ Minimum class complexity1.00
▷ Maximum class complexity128.00
Average method complexity3.88
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes20
▷ Abstract classes15.00%
▷ Concrete classes1995.00%
▷ Final classes00.00%
Methods118
▷ Static methods75.93%
▷ Public methods7361.86%
▷ Protected methods2622.03%
▷ Private methods1916.10%
Functions22
▷ Named functions1359.09%
▷ Anonymous functions940.91%
Constants17
▷ Global constants952.94%
▷ Class constants847.06%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/logo.png14.55KB7.77KB▼ 46.62%