67% super-simple-subscriptions

Code Review | Super Simple Subscriptions

WordPress plugin Super Simple Subscriptions scored67%from 54 tests.

About plugin

  • Plugin page: super-simple-subs...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.4.2
  • WordPress version: 6.3.1
  • First release: Feb 16, 2016
  • Latest release: Mar 23, 2016
  • Number of updates: 5
  • Update frequency: every 7.4 days
  • Top authors: Marcel-NL (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /852 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼0.60MB] [CPU: ▼16.64ms] Passed 4 tests

An overview of server-side resources used by Super Simple Subscriptions
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0840.29 ▼0.11
Dashboard /wp-admin3.40 ▲0.0552.42 ▼11.09
Posts /wp-admin/edit.php3.51 ▲0.1554.16 ▲5.11
Add New Post /wp-admin/post-new.php3.24 ▼2.6438.41 ▼53.24
Media Library /wp-admin/upload.php3.32 ▲0.0936.45 ▼2.10

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

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

Browser metrics Passed 4 tests

Super Simple Subscriptions: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲5514.34 ▼0.021.81 ▼0.2742.64 ▲0.43
Dashboard /wp-admin2,210 ▲335.61 ▼0.0586.26 ▼14.8737.79 ▼2.15
Posts /wp-admin/edit.php2,109 ▲62.00 ▲0.0337.19 ▼2.6632.40 ▼5.52
Add New Post /wp-admin/post-new.php1,538 ▲1223.01 ▼0.65662.44 ▼41.3850.95 ▼13.60
Media Library /wp-admin/upload.php1,412 ▲124.24 ▼0.0198.25 ▼7.9644.78 ▼3.02

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_super_simple_subscriptions
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/super-simple-subscriptions/super_simple_subscriptions.php
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/super-simple-subscriptions/includes/admin.subscriptions.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/super-simple-subscriptions/includes/admin.subscriptions.php on line 4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/super-simple-subscriptions/includes/admin.subscriptions.php on line 4

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

readme.txt 94% 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:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === super-simple-subscriptions === )
The official readme.txt is a good inspiration

super-simple-subscriptions/super_simple_subscriptions.php 85% from 13 tests

The main file in "Super Simple Subscriptions" v. 1.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("super-simple-subscriptions.php" instead of "super_simple_subscriptions.php")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin638 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP8176221480
PO File1354582
Sass38152
JavaScript1131117
Ruby16136
CSS1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity10.50
▷ Minimum class complexity3.00
▷ Maximum class complexity18.00
Average method complexity1.95
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods525.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions888.89%
▷ Anonymous functions111.11%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
8 PNG files occupy 0.59MB with 0.32MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png7.96KB3.68KB▼ 53.80%
assets/icon-256x256.png15.21KB6.11KB▼ 59.86%
assets/screenshot-2.png14.70KB6.24KB▼ 57.57%
assets/screenshot-3.png34.54KB14.27KB▼ 58.70%
assets/banner-1544x500.png380.24KB214.24KB▼ 43.66%