84% apcopay-for-woocommerce

Code Review | ApcoPay for WooCommerce

WordPress plugin ApcoPay for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: apcopay-for-wooco...
  • Plugin version: 1.6.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.0
  • WordPress version: 6.3.1
  • First release: Oct 30, 2019
  • Latest release: Jul 6, 2022
  • Number of updates: 39
  • Update frequency: every 25.2 days
  • Top authors: apcoadriancamilleri (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,862 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

Server-side resources used by ApcoPay for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0138.35 ▼3.42
Dashboard /wp-admin3.32 ▼0.0347.64 ▼19.52
Posts /wp-admin/edit.php3.37 ▲0.0150.00 ▲1.29
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.51 ▼10.53
Media Library /wp-admin/upload.php3.24 ▲0.0137.81 ▲2.95

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

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

Browser metrics Passed 4 tests

A check of browser resources used by ApcoPay for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.121.55 ▼0.2043.12 ▼1.04
Dashboard /wp-admin2,195 ▲305.61 ▲0.0389.83 ▼4.1942.72 ▼7.52
Posts /wp-admin/edit.php2,100 ▼02.02 ▼0.0140.40 ▲0.9335.58 ▼3.69
Add New Post /wp-admin/post-new.php1,537 ▲918.34 ▼4.71637.31 ▼36.0777.90 ▲10.23
Media Library /wp-admin/upload.php1,400 ▼34.19 ▲0.0298.20 ▼0.8340.32 ▼4.46

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

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

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/apcopay-for-woocommerce/apcopay-for-woocommerce.php:19

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 Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: payment gateway, pay, woocommerce, apcopay, credit card...

apcopay-for-woocommerce/apcopay-for-woocommerce.php Passed 13 tests

The entry point to "ApcoPay for WooCommerce" version 1.6.4 is a PHP file that has certain tags in its header comment area
57 characters long description:
Adds the functionality to pay with ApcoPay to WooCommerce

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected1,985 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP22341861,652
JavaScript22428261
Markdown128072

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity165.00
▷ Minimum class complexity165.00
▷ Maximum class complexity165.00
Average method complexity8.45
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods22
▷ Static methods00.00%
▷ Public methods1568.18%
▷ Protected methods00.00%
▷ Private methods731.82%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
7 PNG files occupy 0.11MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-1544x500.png20.08KB8.14KB▼ 59.47%
assets/icon-128x128.png4.11KB2.44KB▼ 40.69%
assets/screenshot-2.png15.83KB6.61KB▼ 58.22%
assets/banner-772x250.png9.43KB4.30KB▼ 54.43%
assets/icon-256x256.png9.62KB4.64KB▼ 51.78%