88% 2parale-for-woocommerce

Code Review | 2Parale for WooCommerce

WordPress plugin 2Parale for WooCommerce scored 88% from 54 tests.

About plugin

  • Plugin page: 2parale-for-wooco...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: Feb 18, 2016
  • Latest release: Feb 18, 2016
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: tetele (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 939 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by 2Parale for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0157.30 ▼1.65
Dashboard /wp-admin3.41 ▲0.0134.75 ▼0.64
Posts /wp-admin/edit.php3.65 ▲0.0148.98 ▲11.12
Add New Post /wp-admin/post-new.php6.89 ▼0.0897.09 ▼1,216.34
Media Library /wp-admin/upload.php3.30 ▲0.0125.18 ▼23.79

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for 2Parale for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲4115.87 ▲1.045.98 ▲0.112.77 ▲0.40
Dashboard /wp-admin2,892 ▲316.13 ▼0.04118.79 ▼25.70161.75 ▼0.16
Posts /wp-admin/edit.php2,688 ▼33.24 ▲0.0167.39 ▼28.61191.05 ▲33.71
Add New Post /wp-admin/post-new.php1,698 ▼5421.90 ▲1.04444.37 ▼28.46162.57 ▲4.59
Media Library /wp-admin/upload.php1,695 ▼35.52 ▼0.03138.42 ▼2.43186.45 ▼20.99

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/2parale-for-woocommerce/plugin.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Integration' not found in wp-content/plugins/2parale-for-woocommerce/integration.php:3

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 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 to be fixed:
  • Requires at least: Version not formatted correctly
You can take inspiration from this readme.txt

2parale-for-woocommerce/plugin.php 92% from 13 tests

"2Parale for WooCommerce" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("2parale-for-woocommerce.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected116 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22913116

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity5.50
▷ Minimum class complexity2.00
▷ Maximum class complexity9.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods116.67%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG files were detected