89% subscription-stock-manager

Code Review | Subscription Stock Manager

WordPress plugin Subscription Stock Manager scored 89% from 54 tests.

About plugin

  • Plugin page: subscription-stoc...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.6.1
  • WordPress version: 6.3.1
  • First release: Feb 18, 2021
  • Latest release: Feb 19, 2021
  • Number of updates: 7
  • Update frequency: every 0.3 days
  • Top authors: codug (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 399 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.15ms] Passed 4 tests

Analyzing server-side resources used by Subscription Stock Manager
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.61 ▼4.23
Dashboard /wp-admin3.32 ▲0.0148.53 ▲0.89
Posts /wp-admin/edit.php3.37 ▲0.0147.52 ▲0.92
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.48 ▼10.19
Media Library /wp-admin/upload.php3.24 ▲0.0140.53 ▲5.18

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Subscription Stock Manager
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲7613.23 ▼1.031.66 ▼0.5243.97 ▼9.83
Dashboard /wp-admin2,214 ▲235.83 ▼0.07100.87 ▼5.9140.62 ▼6.39
Posts /wp-admin/edit.php2,103 ▲142.00 ▼0.1738.57 ▼1.4035.42 ▲1.40
Add New Post /wp-admin/post-new.php1,544 ▲3017.77 ▲0.09634.98 ▼71.4460.34 ▲4.87
Media Library /wp-admin/upload.php1,399 ▲144.22 ▲0.0097.68 ▼22.2742.27 ▼7.69

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
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 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)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: subscriptions, woocommerce, woocommerce subscriptions

subscription-stock-manager/subscription-stock-manager.php 77% from 13 tests

The principal PHP file in "Subscription Stock Manager" v. 1.0.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("5.1" instead of "4.4")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin327 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP5187307327

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity7.80
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity1.94
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods72
▷ Static methods45.56%
▷ Public methods5677.78%
▷ Protected methods1622.22%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants00.00%
▷ Class constants12100.00%
▷ Public constants12100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected