66% recurwp

Code Review | RecurWP - WordPress Recurly Payment Gateway

WordPress plugin RecurWP - WordPress Recurly Payment Gateway scored 66% from 54 tests.

About plugin

  • Plugin page: recurwp
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8.1-5.9
  • WordPress version: 5.9.2
  • First release: Oct 21, 2021
  • Latest release: Feb 13, 2022
  • Number of updates: 3
  • Update frequency: every 38.7 days
  • Top authors: daniyalahmedk (66.67%)wocohort (66.67%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 143 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲4.80MB] [CPU: ▲3,507.81ms] 50% from 4 tests

An overview of server-side resources used by RecurWP - WordPress Recurly Payment Gateway
Please have a look at the following items
  • CPU: Total CPU usage should be kept under 500.00ms (currently 5,053.64ms on /wp-admin/admin.php?page=freemius)
  • Extra CPU: The extra CPU usage must be under 200.00ms (currently 3,507.81ms on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.36 ▲4.8549.83 ▼6.81
Dashboard /wp-admin9.18 ▲5.787,041.69 ▲7,007.11
Posts /wp-admin/edit.php8.38 ▲4.745,092.70 ▲5,053.88
Add New Post /wp-admin/post-new.php11.49 ▲4.525,230.80 ▲3,948.89
Media Library /wp-admin/upload.php8.38 ▲5.095,062.39 ▲5,035.27
Redux Framework /wp-admin/tools.php?page=redux-about8.385,060.11
Freemius Debug [v.2.4.2] /wp-admin/admin.php?page=freemius8.385,053.64

Server storage [IO: ▲8.98MB] [DB: ▲0.06MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 791 new files
Database: no new tables, 7 new options
New WordPress options
fs_gdpr
fs_active_plugins
redux_version_upgraded_from
recurlywp-transients
recurlywp
fs_accounts
fs_debug_mode

Browser metrics Passed 4 tests

A check of browser resources used by RecurWP - WordPress Recurly Payment Gateway
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,909 ▲16514.34 ▼1.3717.76 ▲11.452.76 ▲0.46
Dashboard /wp-admin3,019 ▲1616.16 ▼0.01119.49 ▼24.27189.59 ▲2.05
Posts /wp-admin/edit.php2,744 ▲533.14 ▼0.0965.23 ▲1.19162.53 ▲15.94
Add New Post /wp-admin/post-new.php1,663 ▼8920.56 ▼1.33417.68 ▼47.41216.68 ▲55.58
Media Library /wp-admin/upload.php1,751 ▲565.51 ▲0.00126.54 ▼11.15238.41 ▲54.17
Redux Framework /wp-admin/tools.php?page=redux-about1,3534.04101.86225.68
Freemius Debug [v.2.4.2] /wp-admin/admin.php?page=freemius1,4552.4758.18118.04

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/recurwp/freemius/includes/class-freemius.php+8552
    Undefined property: stdClass::$plugins
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • fs_debug_mode
    • redux_version_upgraded_from
    • fs_active_plugins
    • recurlywp
    • fs_gdpr
    • fs_accounts
    • recurlywp-transients

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/recurwp/freemius/templates/ajax-loader.php
  • 155× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Recurly\\RecurlyError' not found in wp-content/plugins/recurwp/lib/vendor/recurly/recurly-client/lib/recurly/errors/client_error.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Recurly\\RecurlyResource' not found in wp-content/plugins/recurwp/lib/vendor/recurly/recurly-client/lib/recurly/resources/shipping_method.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Recurly\\RecurlyResource' not found in wp-content/plugins/recurwp/lib/vendor/recurly/recurly-client/lib/recurly/resources/payment_method.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/recurwp/options/framework/ReduxCore/inc/welcome/views/changelog.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/recurwp/options/framework/ReduxCore/inc/extensions/customizer/inc/customizer_control.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Recurly\\RecurlyResource' not found in wp-content/plugins/recurwp/lib/vendor/recurly/recurly-client/lib/recurly/resources/coupon_mini.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Recurly\\RecurlyResource' not found in wp-content/plugins/recurwp/lib/vendor/recurly/recurly-client/lib/recurly/resources/coupon_redemption_mini.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Psr\\Log\\AbstractLogger' not found in wp-content/plugins/recurwp/lib/error/vendor/psr/log/Psr/Log/NullLogger.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Recurly\\RecurlyResource' not found in wp-content/plugins/recurwp/lib/vendor/recurly/recurly-client/lib/recurly/resources/billing_info.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Recurly\\RecurlyResource' not found in wp-content/plugins/recurwp/lib/vendor/recurly/recurly-client/lib/recurly/resources/transaction_payment_gateway.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Requires php: Invalid version format
  • Donate link: Invalid URI ("")
  • Screenshots: A description for screenshot #3 is required in recurwp/assets to your readme.txt
Please take inspiration from this readme.txt

recurwp/recurly.php 92% from 13 tests

The main file in "RecurWP - WordPress Recurly Payment Gateway" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("recurwp.php" instead of "recurly.php")

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin106,201 lines of code in 617 files:
LanguageFilesBlank linesComment linesLines of code
PHP37613,64634,13658,085
YAML428628820,884
JavaScript942,8282,19013,892
Sass541,187607,580
CSS61192723,114
JSON1118401,131
SVG100934
Markdown71810413
XML210860
Bourne Again Shell6232055
LESS10053

PHP code 0% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
It is recommended to fix the following
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 2,907)
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 113)
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity28.98
▷ Minimum class complexity1.00
▷ Maximum class complexity2,907.00
Average method complexity3.37
▷ Minimum method complexity1.00
▷ Maximum method complexity113.00
Code structure
Namespaces7
Interfaces2
Traits4
Classes284
▷ Abstract classes72.46%
▷ Concrete classes27797.54%
▷ Final classes82.89%
Methods3,473
▷ Static methods3219.24%
▷ Public methods2,95385.03%
▷ Protected methods1283.69%
▷ Private methods39211.29%
Functions157
▷ Named functions14089.17%
▷ Anonymous functions1710.83%
Constants198
▷ Global constants10251.52%
▷ Class constants9648.48%
▷ Public constants9295.83%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
39 PNG files occupy 0.65MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/logo/logo.png0.43KB0.49KB0.00%
options/framework/ReduxCore/assets/css/vendor/jquery-ui-bootstrap/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
options/framework/ReduxCore/assets/img/3-col-portfolio.png1.00KB0.15KB▼ 85.27%
options/framework/ReduxCore/assets/css/vendor/jquery-ui-bootstrap/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
options/framework/ReduxCore/assets/css/vendor/jquery-ui-bootstrap/images/ui-icons_f6cf3b_256x240.png8.68KB4.11KB▼ 52.68%