84% integracao-entre-eduzz-e-wc-powers

Code Review | Integração entre Eduzz e Woocommerce

WordPress plugin Integração entre Eduzz e Woocommerce scored84%from 54 tests.

About plugin

  • Plugin page: integracao-entre-...
  • Plugin version: 1.7.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-6.0
  • WordPress version: 6.3.1
  • First release: Sep 10, 2020
  • Latest release: Aug 1, 2022
  • Number of updates: 7
  • Update frequency: every 98.6 days
  • Top authors: felipe152 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

40+ active /1,028 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▲0.49ms] Passed 4 tests

A check of server-side resources used by Integração entre Eduzz e Woocommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0047.05 ▼0.28
Dashboard /wp-admin3.38 ▲0.0851.48 ▼0.86
Posts /wp-admin/edit.php3.50 ▲0.1458.54 ▲9.91
Add New Post /wp-admin/post-new.php5.97 ▲0.0888.27 ▼2.61
Media Library /wp-admin/upload.php3.31 ▲0.0741.06 ▲5.69

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Integração entre Eduzz e Woocommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.25 ▼0.391.82 ▲0.1143.61 ▼3.61
Dashboard /wp-admin2,211 ▲315.55 ▼0.0797.37 ▼0.4848.44 ▲6.26
Posts /wp-admin/edit.php2,116 ▲161.97 ▼0.0234.01 ▼2.1936.29 ▲3.84
Add New Post /wp-admin/post-new.php1,541 ▲1323.05 ▼0.10680.27 ▼85.2156.06 ▼11.34
Media Library /wp-admin/upload.php1,416 ▲164.15 ▼0.07114.77 ▲4.7447.26 ▼0.89

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 11× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: access in wp-content/plugins/integracao-entre-eduzz-e-wc-powers/admin/views/wep-settings-startview.php on line 28
    • > PHP Warning
      include_once(): Failed opening 'include/class-wep-eduzz.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/integracao-entre-eduzz-e-wc-powers/admin/class-wep-admin.php on line 2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/integracao-entre-eduzz-e-wc-powers/admin/views/wep-settings-startview.php on line 28
    • > PHP Warning
      include_once(include/class-wep-eduzz.php): failed to open stream: No such file or directory in wp-content/plugins/integracao-entre-eduzz-e-wc-powers/admin/class-wep-admin.php on line 2
    • > PHP Notice
      Undefined variable: access in wp-content/plugins/integracao-entre-eduzz-e-wc-powers/admin/views/wep-settings-startview.php on line 29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_site_url() in wp-content/plugins/integracao-entre-eduzz-e-wc-powers/admin/views/wep-settings-startview.php:39
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/integracao-entre-eduzz-e-wc-powers/admin/views/wep-settings-startview.php on line 29
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/integracao-entre-eduzz-e-wc-powers/admin/views/wep-settings-startview.php on line 27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/integracao-entre-eduzz-e-wc-powers/include/class-wep-webhook.php:2
    • > PHP Notice
      Undefined variable: wep_path in wp-content/plugins/integracao-entre-eduzz-e-wc-powers/admin/class-wep-admin.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === integracao-entre-eduzz-e-wc-powers === )
You can look at the official readme.txt

integracao-entre-eduzz-e-wc-powers/wep-powers.php 92% from 13 tests

The main PHP script in "Integração entre Eduzz e Woocommerce" version 1.7.5 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("integracao-entre-eduzz-e-wc-powers.php" instead of "wep-powers.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin1,721 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP612216846
CSS1601761
JavaScript1130114

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity40.33
▷ Minimum class complexity18.00
▷ Maximum class complexity62.00
Average method complexity5.72
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods2496.00%
▷ Protected methods00.00%
▷ Private methods14.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin