72% change-payments-account

Code Review | Change Payments Account

WordPress plugin Change Payments Account scored 72% from 54 tests.

About plugin

  • Plugin page: change-payments-a...
  • Plugin version: 0.0.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.7
  • WordPress version: 6.3.1
  • First release: Apr 30, 2021
  • Latest release: Apr 30, 2021
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: linqiuyu191 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 320 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲1.39MB] [CPU: ▲15.68ms] Passed 4 tests

An overview of server-side resources used by Change Payments Account
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.83 ▲1.3753.43 ▲7.91
Dashboard /wp-admin4.75 ▲1.4471.10 ▲21.79
Posts /wp-admin/edit.php4.79 ▲1.4471.49 ▲24.07
Add New Post /wp-admin/post-new.php7.28 ▲1.39109.89 ▲14.63
Media Library /wp-admin/upload.php4.58 ▲1.3551.97 ▲18.39

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 516 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Change Payments Account: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,106 ▲34918.55 ▲4.031.67 ▼0.9437.45 ▼13.17
Dashboard /wp-admin2,484 ▲2999.18 ▲4.28188.01 ▲70.4642.01 ▼2.36
Posts /wp-admin/edit.php2,402 ▲3166.08 ▲4.0785.14 ▲50.1035.60 ▲3.64
Add New Post /wp-admin/post-new.php1,839 ▲30622.22 ▼0.96713.62 ▲72.8839.03 ▼11.58
Media Library /wp-admin/upload.php1,551 ▲1636.64 ▲2.46108.20 ▲14.1539.24 ▼0.66
Change Payments Account /wp-admin/crb_carbon_fields_container_change_payments_account.php260.440.1313.77

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/change-payments-account/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php
  • 134× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Datastore\\Meta_Datastore' not found in wp-content/plugins/change-payments-account/vendor/htmlburger/carbon-fields/core/Datastore/Term_Meta_Datastore.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Service\\Service' not found in wp-content/plugins/change-payments-account/vendor/htmlburger/carbon-fields/core/Service/Revisions_Service.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/change-payments-account/vendor/pimple/pimple/src/Pimple/Tests/Psr11/ServiceLocatorTest.php:39
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Condition' not found in wp-content/plugins/change-payments-account/vendor/htmlburger/carbon-fields/core/Container/Condition/Current_User_ID_Condition.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/change-payments-account/vendor/htmlburger/carbon-fields/core/Field/Map_Field.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'CPY\\ProcessorInterface' not found in wp-content/plugins/change-payments-account/processors/Filters.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon_Fields\\Datastore\\Datastore_Holder_Interface' not found in wp-content/plugins/change-payments-account/vendor/htmlburger/carbon-fields/core/Container/Container.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Date_Field' not found in wp-content/plugins/change-payments-account/vendor/htmlburger/carbon-fields/core/Field/Time_Field.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Condition' not found in wp-content/plugins/change-payments-account/vendor/htmlburger/carbon-fields/core/Container/Condition/Post_Parent_ID_Condition.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Service\\Service' not found in wp-content/plugins/change-payments-account/vendor/htmlburger/carbon-fields/core/Service/REST_API_Service.php:11

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
    • > GET request to /wp-admin/crb_carbon_fields_container_change_payments_account.php
    • > Network (severe)
    wp-admin/crb_carbon_fields_container_change_payments_account.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 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
4 plugin tags: credit card, payment, woocommerce, payment request

change-payments-account/change-payments-account.php 77% from 13 tests

The entry point to "Change Payments Account" version 0.0.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Requires PHP: Required version must match the one declared in readme.txt ("7.0" instead of "7.4")
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")

Code Analysis Passed 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 plugin29,818 lines of code in 459 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1725,1878,45912,929
PHP1923,0387,44610,467
PO File278351,0392,254
Sass4833801,764
CSS73251,1391,658
JSON600542
reStructuredText19613997
Markdown429076
XML12016
YAML14015

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
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 complexity7.12
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.01
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces38
Interfaces12
Traits0
Classes155
▷ Abstract classes117.10%
▷ Concrete classes14492.90%
▷ Final classes32.08%
Methods1,059
▷ Static methods1009.44%
▷ Public methods88783.76%
▷ Protected methods16515.58%
▷ Private methods70.66%
Functions163
▷ Named functions2314.11%
▷ Anonymous functions14085.89%
Constants31
▷ Global constants722.58%
▷ Class constants2477.42%
▷ Public constants24100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected