78% myap-v10-tracking-for-woocommerce

Code Review | MYAP for WooCommerce

WordPress plugin MYAP for WooCommerce scored 78% from 54 tests.

About plugin

  • Plugin page: myap-v10-tracking...
  • Plugin version: 10.1.43.1023
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2-5.3.0
  • WordPress version: 6.3.1
  • First release: Jun 9, 2017
  • Latest release: Oct 23, 2019
  • Number of updates: 7
  • Update frequency: every 123.9 days
  • Top authors: myaffiliateprogram (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 796 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼2.64ms] Passed 4 tests

Server-side resources used by MYAP for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.85 ▼4.53
Dashboard /wp-admin3.38 ▲0.0745.20 ▼5.26
Posts /wp-admin/edit.php3.43 ▲0.0745.51 ▼2.29
Add New Post /wp-admin/post-new.php5.95 ▲0.0791.99 ▲2.82
Media Library /wp-admin/upload.php3.30 ▲0.0735.07 ▲1.51
MYAP Config /wp-admin/options-general.php?page=wcmyap_plugin3.2430.61

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for MYAP for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.63 ▼0.681.78 ▼0.0940.22 ▼8.51
Dashboard /wp-admin2,213 ▲225.77 ▼0.1396.45 ▼9.3640.17 ▼3.26
Posts /wp-admin/edit.php2,096 ▲71.97 ▼0.0835.69 ▼0.0732.34 ▲1.42
Add New Post /wp-admin/post-new.php1,517 ▲323.58 ▲5.95577.01 ▼122.8764.55 ▼1.70
Media Library /wp-admin/upload.php1,395 ▲74.19 ▼0.1197.77 ▲1.9146.69 ▲4.33
MYAP Config /wp-admin/options-general.php?page=wcmyap_plugin9122.0323.6230.34

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wcmyap_plugin
    • > Notice in wp-content/plugins/myap-v10-tracking-for-woocommerce/wc-myap10-settings.php+114
    Trying to access array offset on value of type bool

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 fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/myap-v10-tracking-for-woocommerce/wc-myap10-settings.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% 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
9 plugin tags: myap, affiliate program, woocommerce, affiliate tool, affiliate plugin...

myap-v10-tracking-for-woocommerce/wc-myap10.php 85% from 13 tests

The entry point to "MYAP for WooCommerce" version 10.1.43.1023 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("myap-v10-tracking-for-woocommerce.php" instead of "wc-myap10.php")
  • Requires at least: The required version number must match the one declared in readme.txt ("4.0.0" instead of "2.2")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin292 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP210220292

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.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
PNG images were not found in this plugin