10% woocommerce-netsaxept

Code Review | Woocommerce Netaxept

WordPress plugin Woocommerce Netaxept scored10%from 54 tests.

About plugin

  • Plugin page: woocommerce-netsa...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.2-4.8.1
  • WordPress version: 6.3.1
  • First release: Jun 4, 2015
  • Latest release: Sep 5, 2017
  • Number of updates: 6
  • Update frequency: every 137.5 days
  • Top authors: iwcontribution (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,389 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/woocommerce-netsaxept/netaxept/ClassOrder.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; Order has a deprecated constructor

Server metrics [RAM: ▼1.94MB] [CPU: ▼61.27ms] Passed 4 tests

Server-side resources used by Woocommerce Netaxept
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.404.55 ▼40.96
Dashboard /wp-admin2.09 ▼1.265.53 ▼59.57
Posts /wp-admin/edit.php2.09 ▼1.275.13 ▼48.67
Add New Post /wp-admin/post-new.php2.09 ▼3.817.14 ▼95.89
Media Library /wp-admin/upload.php2.09 ▼1.157.50 ▼29.47

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

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

Browser metrics Passed 4 tests

Woocommerce Netaxept: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲5414.23 ▼0.131.67 ▼0.0541.38 ▼14.62
Dashboard /wp-admin2,195 ▲155.59 ▼0.0697.63 ▲8.6942.85 ▲1.42
Posts /wp-admin/edit.php2,100 ▼31.96 ▼0.0839.25 ▲2.0736.24 ▼0.03
Add New Post /wp-admin/post-new.php1,526 ▼1023.06 ▲4.77666.05 ▲16.0557.84 ▼17.23
Media Library /wp-admin/upload.php1,400 ▼34.22 ▲0.01108.33 ▲2.6145.19 ▼0.49

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/woocommerce-netsaxept/netaxept/ClassOrder.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; Order has a deprecated constructor
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

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)
Good news, no errors were detected

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
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/woocommerce-netsaxept/init.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/woocommerce-netsaxept/wc-nets-gateway.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% 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
3 plugin tags: payment gateway, woocommerce netaxept, woocommerce extension

woocommerce-netsaxept/init.php 92% from 13 tests

The main file in "Woocommerce Netaxept" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("woocommerce-netsaxept.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin452 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP813466452

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity3.43
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity1.85
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.22MB with 0.13MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.PNG41.28KB19.48KB▼ 52.80%
assets/screenshot-3.PNG42.41KB18.90KB▼ 55.42%
assets/screenshot-4.PNG90.28KB30.51KB▼ 66.20%
assets/screenshot-1.PNG46.77KB18.79KB▼ 59.82%