83% subscription-shortcodes

Code Review | WooCommerce Subscription Shortcodes

WordPress plugin WooCommerce Subscription Shortcodes scored83%from 54 tests.

About plugin

  • Plugin page: subscription-shor...
  • Plugin version: 1.0.0 Beta...
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.5.3
  • WordPress version: 6.3.1
  • First release: Jul 22, 2016
  • Latest release: Jul 22, 2016
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: sebd86 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,550 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 successfully, without throwing any errors or notices

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

Server-side resources used by WooCommerce Subscription Shortcodes
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0236.05 ▼2.34
Dashboard /wp-admin3.33 ▼0.0244.83 ▼19.91
Posts /wp-admin/edit.php3.38 ▲0.0246.14 ▼0.51
Add New Post /wp-admin/post-new.php5.91 ▲0.0280.86 ▼20.70
Media Library /wp-admin/upload.php3.25 ▲0.0237.50 ▲2.54

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce Subscription Shortcodes
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲3114.39 ▲0.141.67 ▼0.0240.97 ▼3.15
Dashboard /wp-admin2,195 ▲145.54 ▼0.1882.72 ▼18.9439.87 ▲0.78
Posts /wp-admin/edit.php2,106 ▲242.03 ▲0.0339.55 ▲4.0437.33 ▲0.53
Add New Post /wp-admin/post-new.php1,529 ▲323.15 ▲0.23660.54 ▲19.3554.31 ▼7.95
Media Library /wp-admin/upload.php1,397 ▼34.21 ▼0.02103.48 ▼11.8244.87 ▼5.05

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • 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
Even though no errors were found, this is by no means an exhaustive test

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 items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/subscription-shortcodes/includes/class-wcs-shortcodes.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 86% 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:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
You can look at the official readme.txt

subscription-shortcodes/woocommerce-subscription-shortcodes.php 77% from 13 tests

The principal PHP file in "WooCommerce Subscription Shortcodes" v. 1.0.0 Beta... is loaded by WordPress automatically on each request
It is important to fix the following:
  • Version: The version number should only use digits and periods (ex. "1.0.3" instead of "1.0.0 Beta...")
  • Main file name: Name the main plugin file the same as the plugin slug ("subscription-shortcodes.php" instead of "woocommerce-subscription-shortcodes.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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 plugin881 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2251277692
Markdown2900189

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity80.50
▷ Minimum class complexity5.00
▷ Maximum class complexity156.00
Average method complexity6.13
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods31
▷ Static methods2167.74%
▷ Public methods31100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin