78% accumulus-subscription-commerce

Code Review | Accumulus Subscription Commerce

WordPress plugin Accumulus Subscription Commerce scored 78% from 54 tests.

About plugin

  • Plugin page: accumulus-subscri...
  • Plugin version: 2.5.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2.2
  • WordPress version: 5.9.2
  • First release: Mar 20, 2018
  • Latest release: Aug 16, 2019
  • Number of updates: 35
  • Update frequency: every 15.6 days
  • Top authors: accumulus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 923 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.86MB] [CPU: ▼321.99ms] Passed 4 tests

Server-side resources used by Accumulus Subscription Commerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.88 ▲0.3756.64 ▲1.63
Dashboard /wp-admin3.46 ▲0.0623.63 ▼10.53
Posts /wp-admin/edit.php3.46 ▼0.1720.21 ▼16.52
Add New Post /wp-admin/post-new.php3.46 ▼3.5019.66 ▼1,247.46
Media Library /wp-admin/upload.php3.46 ▲0.1619.50 ▼13.44
Accumulus /wp-admin/options-general.php?page=accumulus3.5536.86

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 506 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Accumulus Subscription Commerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,800 ▲4616.23 ▲0.556.24 ▼0.142.31 ▼0.58
Dashboard /wp-admin2,897 ▲436.22 ▲0.02121.95 ▼16.75157.30 ▼8.27
Posts /wp-admin/edit.php2,696 ▲83.24 ▲0.0065.20 ▼2.72141.96 ▼1.03
Add New Post /wp-admin/post-new.php1,693 ▼1821.26 ▲0.49458.65 ▲11.51161.74 ▲5.66
Media Library /wp-admin/upload.php1,706 ▲85.49 ▼0.03138.18 ▼11.36188.73 ▼11.01
Accumulus /wp-admin/options-general.php?page=accumulus1,2062.43125.11174.64

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/accumulus-subscription-commerce/settings.php+259
    Undefined index: page

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=accumulus
    • > Notice in wp-content/plugins/accumulus-subscription-commerce/settings.php+171
    Undefined index: showitest

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
  • 64× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\ResponseInterface' not found in wp-content/plugins/accumulus-subscription-commerce/vendor/guzzlehttp/psr7/src/Response.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\TaskQueueInterface' not found in wp-content/plugins/accumulus-subscription-commerce/vendor/guzzlehttp/promises/src/TaskQueue.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/accumulus-subscription-commerce/vendor/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'League\\OAuth2\\Client\\Grant\\AbstractGrant' not found in wp-content/plugins/accumulus-subscription-commerce/vendor/league/oauth2-client/src/Grant/ClientCredentials.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'League\\OAuth2\\Client\\Provider\\Exception\\IdentityProviderException' not found in wp-content/plugins/accumulus-subscription-commerce/vendor/league/oauth2-accumulus/src/Provider/Exception/AccumulusIdentityProviderException.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Psr7\\Request' not found in wp-content/plugins/accumulus-subscription-commerce/vendor/guzzlehttp/psr7/src/ServerRequest.php:25
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/accumulus-subscription-commerce/vendor/guzzlehttp/promises/src/Promise.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/accumulus-subscription-commerce/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/accumulus-subscription-commerce/vendor/guzzlehttp/psr7/src/BufferStream.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\TransferException' not found in wp-content/plugins/accumulus-subscription-commerce/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found


Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === accumulus-subscription-commerce === )
  • Screenshots: Please add images for these screenshots: #1 (Accumulus Subscription Commerce Signup Widget for Wordpress), #2 (Accumulus WordPress Settings)
You can take inspiration from this readme.txt

accumulus-subscription-commerce/accumulus.php 92% from 13 tests

The main file in "Accumulus Subscription Commerce" v. 2.5.2 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: Name the main plugin file the same as the plugin slug ("accumulus-subscription-commerce.php" instead of "accumulus.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected29,486 lines of code in 436 files:
LanguageFilesBlank linesComment linesLines of code
PO File1201953
Bourne Shell1203

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity10.95
▷ Minimum class complexity1.00
▷ Maximum class complexity80.00
Average method complexity2.41
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
▷ Abstract classes22.41%
▷ Concrete classes8197.59%
▷ Final classes78.64%
▷ Static methods658.43%
▷ Public methods59777.43%
▷ Protected methods648.30%
▷ Private methods11014.27%
▷ Named functions9150.84%
▷ Anonymous functions8849.16%
▷ Global constants58.93%
▷ Class constants5191.07%
▷ Public constants51100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
47 PNG files occupy 0.44MB with 0.21MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png153.97KB43.02KB▼ 72.06%
public/css/themes/default/images/ui-bg_flat_55_ffffff_40x100.png0.20KB0.08KB▼ 58.17%
public/css/themes/default/images/ui-icons_888888_256x240.png6.83KB4.17KB▼ 38.92%
public/css/themes/default/images/ui-bg_flat_25_acd0fe_40x100.png0.20KB0.08KB▼ 57.77%
public/css/themes/default/images/ui-icons_cc0000_256x240.png4.52KB4.18KB▼ 7.56%