84% chip-for-paymattic

Code Review | CHIP for Paymattic

WordPress plugin CHIP for Paymattic scored84%from 54 tests.

About plugin

  • Plugin page: chip-for-paymattic
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1
  • WordPress version: 6.3.1
  • First release: Dec 23, 2022
  • Latest release: Jan 16, 2023
  • Number of updates: 3
  • Update frequency: every 8.0 days
  • Top authors: chipasia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /195 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
Installer ran successfully

Server metrics [RAM: ▲1.35MB] [CPU: ▲7.81ms] Passed 4 tests

Server-side resources used by CHIP for Paymattic
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.83 ▲1.3751.69 ▲5.76
Dashboard /wp-admin4.69 ▲1.3864.57 ▲11.57
Posts /wp-admin/edit.php4.74 ▲1.3859.50 ▲4.08
Add New Post /wp-admin/post-new.php7.20 ▲1.32101.11 ▲9.82
Media Library /wp-admin/upload.php4.55 ▲1.3250.94 ▲17.34

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 149 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

CHIP for Paymattic: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.03 ▼0.131.75 ▼0.1238.65 ▼8.00
Dashboard /wp-admin2,198 ▲245.63 ▲0.0190.56 ▼2.9437.80 ▼3.14
Posts /wp-admin/edit.php2,103 ▲31.99 ▼0.0233.62 ▼10.2433.24 ▼8.61
Add New Post /wp-admin/post-new.php1,526 ▼023.60 ▲0.37660.99 ▼42.7858.12 ▲2.55
Media Library /wp-admin/upload.php1,400 ▼04.16 ▲0.08100.76 ▼1.7643.25 ▼2.23

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant PYMTC_CHIP_FSLUG - assumed 'PYMTC_CHIP_FSLUG' (this will throw an Error in a future version of PHP) in wp-content/plugins/chip-for-paymattic/includes/admin/form-settings.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/chip-for-paymattic/includes/class-inject-chip-logo.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'CSF_Setup' not found in wp-content/plugins/chip-for-paymattic/includes/admin/backup-settings.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WPPayForm\\App\\Services\\GeneralSettings' not found in wp-content/plugins/chip-for-paymattic/includes/admin/global-settings.php:7
    • > PHP Warning
      Use of undefined constant PYMTC_CHIP_FSLUG - assumed 'PYMTC_CHIP_FSLUG' (this will throw an Error in a future version of PHP) in wp-content/plugins/chip-for-paymattic/includes/admin/global-settings.php on line 5
    • > PHP Warning
      Use of undefined constant PYMTC_CHIP_FSLUG - assumed 'PYMTC_CHIP_FSLUG' (this will throw an Error in a future version of PHP) in wp-content/plugins/chip-for-paymattic/includes/admin/backup-settings.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'CSF_Setup' not found in wp-content/plugins/chip-for-paymattic/includes/admin/form-settings.php:97

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention: The official readme.txt is a good inspiration

chip-for-paymattic/chip-for-paymattic.php Passed 13 tests

"CHIP for Paymattic" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
42 characters long description:
CHIP - Better Payment & Business Solutions

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
There were no executable files found in this plugin31,601 lines of code in 125 files:
LanguageFilesBlank linesComment linesLines of code
PHP752,5779427,950
JavaScript51,3004976,564
PO File203,1983,5916,500
Sass1697035,674
CSS43765094,872
SVG40027
Markdown18014

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of 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.64
Average class complexity24.56
▷ Minimum class complexity1.00
▷ Maximum class complexity151.00
Average method complexity6.46
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes66
▷ Abstract classes23.03%
▷ Concrete classes6496.97%
▷ Final classes00.00%
Methods286
▷ Static methods4415.38%
▷ Public methods27295.10%
▷ Protected methods00.00%
▷ Private methods144.90%
Functions25
▷ Named functions2496.00%
▷ Anonymous functions14.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/codestar-framework/assets/images/checkerboard.png2.29KB2.54KB0.00%