10% altoshift-woocommerce

Code Review | Altoshift For Woocommerce

WordPress plugin Altoshift For Woocommerce scored 10% from 54 tests.

About plugin

  • Plugin page: altoshift-woocomm...
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 19, 2019
  • Latest release: Sep 12, 2019
  • Number of updates: 18
  • Update frequency: every 10.1 days
  • Top authors: altoshift (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 624 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/altoshift-woocommerce/AltoshiftWoocommercePlugin.php+178
    array_key_exists() expects parameter 2 to be array, bool given

Server metrics [RAM: ▼1.96MB] [CPU: ▼52.80ms] Passed 4 tests

Analyzing server-side resources used by Altoshift For Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.81 ▼37.93
Dashboard /wp-admin2.05 ▼1.265.58 ▼45.72
Posts /wp-admin/edit.php2.05 ▼1.316.82 ▼40.60
Add New Post /wp-admin/post-new.php2.05 ▼3.846.31 ▼86.95
Media Library /wp-admin/upload.php2.05 ▼1.186.94 ▼28.20

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Altoshift For Woocommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.67 ▼0.791.65 ▼0.2440.09 ▼1.70
Dashboard /wp-admin2,209 ▲214.85 ▼0.0396.66 ▼5.7336.42 ▼7.79
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0739.07 ▲3.3335.94 ▼0.74
Add New Post /wp-admin/post-new.php1,534 ▼023.03 ▼0.07645.55 ▼23.5359.03 ▲1.13
Media Library /wp-admin/upload.php1,391 ▼04.23 ▲0.06102.52 ▲0.2448.22 ▲2.54

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/altoshift-woocommerce/AltoshiftWoocommercePlugin.php+178
    array_key_exists() expects parameter 2 to be array, bool given
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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 take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/altoshift-woocommerce/includes/views/admin/settings/feed-url.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Requires at least: The plugin version is formatted incorrectly
You can take inspiration from this readme.txt

altoshift-woocommerce/AltoshiftWoocommercePlugin.php 92% from 13 tests

The entry point to "Altoshift For Woocommerce" version 1.0.4 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("altoshift-woocommerce.php" instead of "AltoshiftWoocommercePlugin.php")

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 detected629 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP1114514629

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity12.20
▷ Minimum class complexity1.00
▷ Maximum class complexity37.00
Average method complexity2.59
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods38
▷ Static methods1026.32%
▷ Public methods2668.42%
▷ Protected methods00.00%
▷ Private methods1231.58%
Functions6
▷ Named functions116.67%
▷ Anonymous functions583.33%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin