10% abeta-punchout

Code Review | Abeta OCI PunchOut

WordPress plugin Abeta OCI PunchOut scored 10% from 54 tests.

About plugin

  • Plugin page: abeta-punchout
  • Plugin version: 0.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.3.2
  • WordPress version: 5.9.2
  • First release: Sep 8, 2020
  • Latest release: Sep 8, 2020
  • Number of updates: 2
  • Update frequency: every 27.5 days
  • Top authors: thijzie (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,058 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/abeta-punchout/abeta-po.php+109
    Non-static method ABETA_PO_Activator::activate() should not be called statically

Server metrics [RAM: ▼0.02MB] [CPU: ▼309.76ms] Passed 4 tests

A check of server-side resources used by Abeta OCI PunchOut
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0163.54 ▲14.20
Dashboard /wp-admin3.42 ▲0.0134.11 ▼47.15
Posts /wp-admin/edit.php3.65 ▲0.0136.36 ▼3.18
Add New Post /wp-admin/post-new.php6.89 ▼0.0994.01 ▼1,191.14
Media Library /wp-admin/upload.php3.30 ▲0.0026.35 ▲2.44

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 178 new files
Database: no new tables, 6 new options
New WordPress options
fs_active_plugins
Activated_Abeta_OCI_PunchOut
fs_gdpr
fs_accounts
ABETA_PO_sso_app_token
fs_debug_mode

Browser metrics Passed 4 tests

Checking browser requirements for Abeta OCI PunchOut
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲7315.83 ▲0.056.00 ▲0.043.00 ▲0.61
Dashboard /wp-admin2,889 ▲286.15 ▼0.06123.62 ▼10.32194.05 ▲28.02
Posts /wp-admin/edit.php2,691 ▼113.24 ▲0.1963.47 ▼25.71138.62 ▼33.08
Add New Post /wp-admin/post-new.php1,696 ▲3521.14 ▲3.82446.20 ▲6.87215.83 ▲49.99
Media Library /wp-admin/upload.php1,695 ▼35.54 ▲0.05141.23 ▼11.38237.04 ▲44.42

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • fs_accounts
    • fs_gdpr
    • fs_active_plugins
    • fs_debug_mode
    • Activated_Abeta_OCI_PunchOut
    • ABETA_PO_sso_app_token

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% 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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/abeta-punchout/freemius/templates/ajax-loader.php
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/abeta-punchout/freemius/templates/account/partials/addon.php on line 8
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/abeta-punchout/freemius/templates/account/partials/addon.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freemius() in wp-content/plugins/abeta-punchout/freemius/templates/partials/network-activation.php:6
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/abeta-punchout/freemius/templates/account/partials/addon.php:9
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/abeta-punchout/freemius/templates/account/partials/addon.php on line 6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/abeta-punchout/freemius/templates/account/partials/addon.php on line 6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/abeta-punchout/freemius/templates/account/partials/addon.php on line 7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/abeta-punchout/freemius/templates/account/partials/addon.php on line 8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

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
4 plugin tags: woocommerce, oci, abeta, punchout

abeta-punchout/abeta-po.php 92% from 13 tests

The entry point to "Abeta OCI PunchOut" version 0.4 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("abeta-punchout.php" instead of "abeta-po.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected31,063 lines of code in 133 files:
LanguageFilesBlank linesComment linesLines of code
PHP1177,36416,37830,799
JavaScript33459194
CSS130770

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 2,885)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity78.37
▷ Minimum class complexity1.00
▷ Maximum class complexity2,885.00
Average method complexity4.55
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes52
▷ Abstract classes23.85%
▷ Concrete classes5096.15%
▷ Final classes00.00%
Methods1,165
▷ Static methods17414.94%
▷ Public methods82070.39%
▷ Protected methods151.29%
▷ Private methods33028.33%
Functions98
▷ Named functions9798.98%
▷ Anonymous functions11.02%
Constants135
▷ Global constants10880.00%
▷ Class constants2720.00%
▷ Public constants27100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/abeta-punchout.png9.16KB5.26KB▼ 42.58%