84% paywong-payments

Code Review | Paywong Payments

WordPress plugin Paywong Payments scored84%from 54 tests.

About plugin

  • Plugin page: paywong-payments
  • Plugin version: 2.0.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0.2
  • WordPress version: 6.3.1
  • First release: Nov 4, 2022
  • Latest release: Mar 14, 2023
  • Number of updates: 15
  • Update frequency: every 8.9 days
  • Top authors: paywong (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /266 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.86ms] Passed 4 tests

Analyzing server-side resources used by Paywong Payments
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.05 ▼10.05
Dashboard /wp-admin3.31 ▲0.0147.65 ▼4.01
Posts /wp-admin/edit.php3.36 ▲0.0052.56 ▼0.71
Add New Post /wp-admin/post-new.php5.89 ▲0.0096.25 ▼4.68
Media Library /wp-admin/upload.php3.23 ▲0.0036.54 ▲2.51

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 1,060 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Paywong Payments
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.71 ▼0.931.73 ▼0.5940.46 ▼2.05
Dashboard /wp-admin2,209 ▲184.87 ▼0.04109.41 ▲5.0141.47 ▼3.39
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0140.10 ▼0.8334.48 ▼2.38
Add New Post /wp-admin/post-new.php1,519 ▲523.13 ▲5.61622.32 ▲17.5349.06 ▼3.90
Media Library /wp-admin/upload.php1,382 ▼94.18 ▲0.0598.51 ▼1.7042.25 ▲1.21

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 77× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_UnitTestCase' not found in wp-content/plugins/paywong-payments/libraries/action-scheduler/tests/phpunit/jobs/ActionScheduler_Action_Test.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Abstract_RecurringSchedule' not found in wp-content/plugins/paywong-payments/libraries/action-scheduler/classes/schedules/ActionScheduler_IntervalSchedule.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_DBStore' not found in wp-content/plugins/paywong-payments/libraries/action-scheduler/classes/migration/ActionScheduler_DBStoreMigrator.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Store_Deprecated' not found in wp-content/plugins/paywong-payments/libraries/action-scheduler/classes/abstracts/ActionScheduler_Store.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_UnitTestCase' not found in wp-content/plugins/paywong-payments/libraries/action-scheduler/tests/phpunit/versioning/ActionScheduler_Versions_Test.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_UnitTestCase' not found in wp-content/plugins/paywong-payments/libraries/action-scheduler/tests/phpunit/migration/Config_Test.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_UnitTestCase' not found in wp-content/plugins/paywong-payments/libraries/action-scheduler/tests/phpunit/migration/LogMigrator_Test.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_UnitTestCase' not found in wp-content/plugins/paywong-payments/libraries/action-scheduler/tests/phpunit/helpers/ActionScheduler_TimezoneHelper_Test.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_UnitTestCase' not found in wp-content/plugins/paywong-payments/libraries/action-scheduler/tests/phpunit/schedules/ActionScheduler_SimpleSchedule_Test.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_UnitTestCase' not found in wp-content/plugins/paywong-payments/libraries/action-scheduler/tests/phpunit/migration/Scheduler_Test.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: crypto, payments

paywong-payments/paywong-for-woocommerce.php 92% from 13 tests

The entry point to "Paywong Payments" version 2.0.6 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("paywong-payments.php" instead of "paywong-for-woocommerce.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
Success! There were no dangerous files found in this plugin105,561 lines of code in 1,028 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1953,85811,83579,386
JSON6690013,086
PHP1282,5235,7689,787
TypeScript5409331,419
Markdown1969401,395
Bourne Shell12311147
YAML4156111
XML38391
HTML28052
Sass110047
SVG10040

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity8.99
▷ Minimum class complexity1.00
▷ Maximum class complexity85.00
Average method complexity2.15
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces5
Interfaces3
Traits0
Classes113
▷ Abstract classes1614.16%
▷ Concrete classes9785.84%
▷ Final classes00.00%
Methods835
▷ Static methods8510.18%
▷ Public methods66279.28%
▷ Protected methods14217.01%
▷ Private methods313.71%
Functions40
▷ Named functions2357.50%
▷ Anonymous functions1742.50%
Constants36
▷ Global constants25.56%
▷ Class constants3494.44%
▷ Public constants34100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
libraries/action-scheduler/docs/android-chrome-256x256.png2.93KB3.03KB0.00%
includes/assets/icon.png0.70KB0.63KB▼ 10.45%
libraries/action-scheduler/docs/favicon-32x32.png1.16KB0.71KB▼ 39.02%
libraries/action-scheduler/docs/android-chrome-192x192.png6.77KB2.46KB▼ 63.68%
libraries/action-scheduler/docs/mstile-150x150.png4.15KB3.67KB▼ 11.47%