84% wc-ame-digital

Code Review | Pagamento QR Code Ame Digital

WordPress plugin Pagamento QR Code Ame Digital scored84%from 54 tests.

About plugin

  • Plugin page: wc-ame-digital
  • Plugin version: 1.2.7
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0.2
  • WordPress version: 6.3.1
  • First release: May 21, 2020
  • Latest release: Sep 20, 2022
  • Number of updates: 26
  • Update frequency: every 32.8 days
  • Top authors: apiki (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

30+ active /2,466 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: ▲0.71MB] [CPU: ▼1.32ms] Passed 4 tests

Analyzing server-side resources used by Pagamento QR Code Ame Digital
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.21 ▲0.7542.51 ▼1.90
Dashboard /wp-admin4.04 ▲0.7357.15 ▲5.35
Posts /wp-admin/edit.php4.09 ▲0.7355.52 ▲2.18
Add New Post /wp-admin/post-new.php6.59 ▲0.7091.06 ▼9.81
Media Library /wp-admin/upload.php3.90 ▲0.6742.25 ▲4.27

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Pagamento QR Code Ame Digital
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,960 ▲21414.84 ▲0.2034.87 ▲33.0838.04 ▼1.74
Dashboard /wp-admin2,213 ▲225.89 ▲0.9996.19 ▼7.9039.31 ▼6.01
Posts /wp-admin/edit.php2,093 ▲12.04 ▲0.0234.25 ▼5.6035.37 ▼3.15
Add New Post /wp-admin/post-new.php1,522 ▲323.11 ▼0.01614.72 ▼28.0850.48 ▼6.70
Media Library /wp-admin/upload.php1,395 ▲74.20 ▲0.0197.31 ▼4.1342.77 ▼2.66

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 192× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\Container\\Argument\\ArgumentResolverInterface' not found in wp-content/plugins/wc-ame-digital/vendor/league/container/src/Inflector/Inflector.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WPSteak\\Providers\\AbstractHookProvider' not found in wp-content/plugins/wc-ame-digital/src/Providers/Orders/Pqad_QrCode.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wc-ame-digital/vendor/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'WPSteak\\Entities\\CollectionInterface' not found in wp-content/plugins/wc-ame-digital/vendor/apiki/wpsteak/src/Entities/Collection.php:15
    • > PHP Fatal error
      Trait 'WPSteak\\Services\\Labels\\Common' not found in wp-content/plugins/wc-ame-digital/vendor/apiki/wpsteak/src/Services/Labels/PostType.php on line 17
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wc-ame-digital/vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php:5
    • > PHP Warning
      include_once(wp-content/plugins/wc-ame-digital/vendor/dusank/knapsack/tests/performance/../../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/wc-ame-digital/vendor/dusank/knapsack/tests/performance/reduce_vs_array_reduce.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wc-ame-digital/vendor/composer/installers/src/Composer/Installers/GravInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\Container\\Argument\\ClassNameInterface' not found in wp-content/plugins/wc-ame-digital/vendor/league/container/src/Argument/ClassName.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\Container\\ContainerAwareInterface' not found in wp-content/plugins/wc-ame-digital/vendor/league/container/src/ServiceProvider/ServiceProviderAggregateInterface.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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
Attributes that require attention:
  • Screenshots: Screenshot #2 (Configuração de Pagamento) image missing
Please take inspiration from this readme.txt

wc-ame-digital/wc-ame-digital.php Passed 13 tests

The main file in "Pagamento QR Code Ame Digital" v. 1.2.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
58 characters long description:
Gateway de pagamento QR Code Ame Digital para WooCommerce.

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
Everything looks great! No dangerous files found in this plugin19,299 lines of code in 375 files:
LanguageFilesBlank linesComment linesLines of code
PHP2412,2204,6479,148
Markdown321,08103,704
Sass376312842,860
JavaScript303953531,040
JSON1200972
SVG100685
CSS42063391
HTML62723162
YAML7144137
PO File13664108
XML44092

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity1.73
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces38
Interfaces26
Traits12
Classes185
▷ Abstract classes147.57%
▷ Concrete classes17192.43%
▷ Final classes00.00%
Methods694
▷ Static methods608.65%
▷ Public methods62289.63%
▷ Protected methods639.08%
▷ Private methods91.30%
Functions260
▷ Named functions10038.46%
▷ Anonymous functions16061.54%
Constants28
▷ Global constants00.00%
▷ Class constants28100.00%
▷ Public constants28100.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
3 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
resources/images/ame-logo.png1.49KB1.36KB▼ 8.46%
vendor/league/container/docs/assets/images/code.png31.43KB13.83KB▼ 56.00%
resources/images/ame-pay.png9.41KB4.26KB▼ 54.70%