83% storekit

Code Review | StoreKit

WordPress plugin StoreKit scored83%from 54 tests.

About plugin

  • Plugin page: storekit
  • Plugin version: 1.1.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.1
  • WordPress version: 6.3.1
  • First release: Apr 15, 2022
  • Latest release: Feb 25, 2023
  • Number of updates: 10
  • Update frequency: every 31.6 days
  • Top authors: tanjiralmamun (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,426 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼0.82ms] Passed 4 tests

Analyzing server-side resources used by StoreKit
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0340.64 ▼1.69
Dashboard /wp-admin3.40 ▲0.1051.20 ▼1.01
Posts /wp-admin/edit.php3.52 ▲0.1654.71 ▲3.25
Add New Post /wp-admin/post-new.php5.99 ▲0.1096.20 ▼3.82
Media Library /wp-admin/upload.php3.33 ▲0.0939.55 ▲3.25

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
storekit_installed
widget_recent-comments
storekit_version
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for StoreKit
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲1314.37 ▼0.241.80 ▼0.2546.05 ▼1.48
Dashboard /wp-admin2,205 ▲255.61 ▼0.0390.00 ▼1.0544.52 ▲0.90
Posts /wp-admin/edit.php2,113 ▲162.00 ▼0.0239.80 ▲2.2836.48 ▲1.93
Add New Post /wp-admin/post-new.php1,536 ▲1023.37 ▲0.21661.22 ▼9.3750.47 ▼17.71
Media Library /wp-admin/upload.php1,413 ▲134.21 ▲0.05100.94 ▲1.6545.18 ▲4.13

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
  • Zombie WordPress options detected upon uninstall: 8 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • storekit_version
    • db_upgraded
    • storekit_installed
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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 fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/storekit/includes/functions.php:60
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Email' not found in wp-content/plugins/storekit/includes/Emails/NewCustomer.php:11

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 90% from 29 tests

readme.txt 88% 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
Attributes that require attention:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
  • Donate link: Please fix this invalid url: ""
You can take inspiration from this readme.txt

storekit/storekit.php 92% from 13 tests

This is the main PHP file of "StoreKit" version 1.1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.7" instead of "6.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,400 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP103685981,363
CSS131028
JavaScript1209

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity15.43
▷ Minimum class complexity2.00
▷ Maximum class complexity69.00
Average method complexity2.11
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes114.29%
Methods73
▷ Static methods11.37%
▷ Public methods7298.63%
▷ Protected methods00.00%
▷ Private methods11.37%
Functions16
▷ Named functions1593.75%
▷ Anonymous functions16.25%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected