78% ultimate-membership-pro-razorpay

Code Review | Razorpay for Ultimate Membership Pro

WordPress plugin Razorpay for Ultimate Membership Pro scored78%from 54 tests.

About plugin

  • Plugin page: ultimate-membersh...
  • Plugin version: 1.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1.1-6.0
  • WordPress version: 6.3.1
  • First release: Oct 10, 2022
  • Latest release: Apr 27, 2023
  • Number of updates: 27
  • Update frequency: every 7.4 days
  • Top authors: wpindeed (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,144 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
The plugin installed gracefully, with no errors

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

Server-side resources used by Razorpay for Ultimate Membership Pro
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.56 ▲0.91
Dashboard /wp-admin3.31 ▲0.0148.10 ▼4.92
Posts /wp-admin/edit.php3.36 ▲0.0151.64 ▲1.39
Add New Post /wp-admin/post-new.php5.89 ▲0.0197.48 ▼1.58
Media Library /wp-admin/upload.php3.24 ▲0.0137.40 ▼2.14

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Razorpay for Ultimate Membership Pro
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.22 ▼1.011.80 ▼0.1841.25 ▼2.48
Dashboard /wp-admin2,207 ▲195.76 ▼0.14100.69 ▼3.2543.16 ▲0.61
Posts /wp-admin/edit.php2,095 ▲62.00 ▼0.0441.91 ▲4.0134.73 ▼1.39
Add New Post /wp-admin/post-new.php1,537 ▲423.19 ▲0.06621.69 ▼64.0161.03 ▲2.20
Media Library /wp-admin/upload.php1,395 ▲44.19 ▼0.0397.97 ▼4.4344.37 ▼1.63

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/ultimate-membership-pro-razorpay/classes/libs/razorpay/vendor/nikic/php-parser/grammar/rebuildParsers.php
  • 874× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WpOrg\\Requests\\Exception\\Http' not found in wp-content/plugins/ultimate-membership-pro-razorpay/classes/libs/razorpay/libs/Requests-2.0.0/src/Exception/Http/Status403.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'WpOrg\\Requests\\Exception\\Http' not found in wp-content/plugins/ultimate-membership-pro-razorpay/classes/libs/razorpay/vendor/rmccue/requests/src/Exception/Http/Status403.php:33
    • > PHP Fatal error
      Uncaught Error: Interface 'phpDocumentor\\Reflection\\Type' not found in wp-content/plugins/ultimate-membership-pro-razorpay/classes/libs/razorpay/vendor/phpdocumentor/type-resolver/src/Types/Object_.php:61
    • > PHP Fatal error
      Uncaught Error: Class 'PhpParser\ode\\Expr\\AssignOp' not found in wp-content/plugins/ultimate-membership-pro-razorpay/classes/libs/razorpay/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\File' not found in wp-content/plugins/ultimate-membership-pro-razorpay/classes/libs/razorpay/vendor/phpunit/php-code-coverage/src/Report/Xml/Report.php:37
    • > PHP Fatal error
      Uncaught Error: Class 'PhpParser\ode\\Expr\\Cast' not found in wp-content/plugins/ultimate-membership-pro-razorpay/classes/libs/razorpay/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WpOrg\\Requests\\Exception\\Http' not found in wp-content/plugins/ultimate-membership-pro-razorpay/classes/libs/razorpay/libs/Requests-2.0.0/src/Exception/Http/Status412.php:33
    • > PHP Fatal error
      Uncaught Error: Interface 'PHPUnit\\Runner\\TestHook' not found in wp-content/plugins/ultimate-membership-pro-razorpay/classes/libs/razorpay/vendor/phpunit/phpunit/src/Runner/Hook/AfterSkippedTestHook.php:41
    • > PHP Fatal error
      Uncaught Error: Class 'PhpParser\ode\\Expr' not found in wp-content/plugins/ultimate-membership-pro-razorpay/classes/libs/razorpay/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\CodeCoverageException' not found in wp-content/plugins/ultimate-membership-pro-razorpay/classes/libs/razorpay/vendor/phpunit/phpunit/src/Framework/Exception/InvalidCoversTargetException.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
6 plugin tags: transaction, user, ultimate membership pro, free, member...

ultimate-membership-pro-razorpay/ultimate-membership-pro-razorpay.php Passed 13 tests

The entry point to "Razorpay for Ultimate Membership Pro" version 1.3 is a PHP file that has certain tags in its header comment area
88 characters long description:
Users may become members by purchasing one time memberships through this payment method.

Code Analysis 97% 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
There were no executable files found in this plugin97,964 lines of code in 1,416 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,26218,67139,13584,144
Markdown682,70305,615
JSON421204,123
yacc3328122,015
XSD300964
CSS1012429539
YAML4511291
XML1210161
JavaScript781567
reStructuredText2231831
SVG30014

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 145)
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity8.59
▷ Minimum class complexity1.00
▷ Maximum class complexity367.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity145.00
Code structure
Namespaces138
Interfaces109
Traits5
Classes1,175
▷ Abstract classes494.17%
▷ Concrete classes1,12695.83%
▷ Final classes60253.46%
Methods6,115
▷ Static methods1,05217.20%
▷ Public methods4,86679.57%
▷ Protected methods6069.91%
▷ Private methods64310.52%
Functions1,495
▷ Named functions23815.92%
▷ Anonymous functions1,25784.08%
Constants656
▷ Global constants182.74%
▷ Class constants63897.26%
▷ Public constants58391.38%

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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/razorpay.png12.83KB4.18KB▼ 67.37%