89% parsian-woocommerce

Code Review | Parsian Woocommerce

WordPress plugin Parsian Woocommerce scored89%from 54 tests.

About plugin

  • Plugin page: parsian-woocommerce
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7.2
  • WordPress version: 6.3.1
  • First release: Feb 17, 2017
  • Latest release: Aug 31, 2018
  • Number of updates: 6
  • Update frequency: every 93.3 days
  • Top authors: barfaraz (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /5,731 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

This is a short check of server-side resources used by Parsian Woocommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0635.34 ▼16.34
Dashboard /wp-admin3.36 ▲0.0644.00 ▼2.17
Posts /wp-admin/edit.php3.42 ▲0.0646.27 ▲2.92
Add New Post /wp-admin/post-new.php5.95 ▲0.0690.92 ▲0.66
Media Library /wp-admin/upload.php3.29 ▲0.0632.17 ▼1.62

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Parsian Woocommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.301.50 ▼0.6839.64 ▼14.88
Dashboard /wp-admin2,198 ▲185.63 ▼0.0393.44 ▼3.9742.57 ▼0.07
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0839.69 ▲0.7437.00 ▲5.36
Add New Post /wp-admin/post-new.php1,526 ▼823.38 ▲5.36581.86 ▼26.5944.50 ▼25.92
Media Library /wp-admin/upload.php1,397 ▲64.19 ▼0.0495.05 ▼3.5940.73 ▼3.22

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (Settings page) image not found
  • Tags: There are too many tags (14 tag instead of maximum 10)
You can take inspiration from this readme.txt

parsian-woocommerce/parsian-woocommerce.php 92% from 13 tests

"Parsian Woocommerce" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Plugin Name: It is recommended to keep the plugin name shorter than 70 characters (currently 81 characters long)

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
Success! There were no dangerous files found in this plugin5,676 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP34412,4065,676

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity90.27
▷ Minimum class complexity1.00
▷ Maximum class complexity388.00
Average method complexity9.58
▷ Minimum method complexity1.00
▷ Maximum method complexity82.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods156
▷ Static methods00.00%
▷ Public methods156100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.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
2 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png3.94KB2.17KB▼ 44.92%
screenshot-1.png60.84KB28.29KB▼ 53.50%