83% woo-mahacod-post

Code Review | سرویس خرید پستی ماها

WordPress plugin سرویس خرید پستی ماها scored 83% from 54 tests.

About plugin

  • Plugin page: woo-mahacod-post
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Jul 27, 2015
  • Latest release: Nov 1, 2015
  • Number of updates: 12
  • Update frequency: every 8.2 days
  • Top authors: mp.hamid (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,385 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼4.27ms] Passed 4 tests

An overview of server-side resources used by سرویس خرید پستی ماها
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0945.16 ▲1.46
Dashboard /wp-admin3.39 ▲0.0947.04 ▼6.41
Posts /wp-admin/edit.php3.50 ▲0.1549.08 ▲1.68
Add New Post /wp-admin/post-new.php5.97 ▲0.0987.74 ▼9.65
Media Library /wp-admin/upload.php3.31 ▲0.0936.71 ▼2.47

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for سرویس خرید پستی ماها
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9613.18 ▼1.201.96 ▲0.2042.07 ▼5.03
Dashboard /wp-admin2,211 ▲265.83 ▲0.8796.62 ▼21.1240.96 ▼3.94
Posts /wp-admin/edit.php2,091 ▲51.98 ▼0.0637.42 ▲2.9334.68 ▼0.54
Add New Post /wp-admin/post-new.php1,419 ▼11522.32 ▼0.90600.67 ▼81.0630.74 ▼36.43
Media Library /wp-admin/upload.php1,384 ▼44.19 ▼0.0497.66 ▼2.1541.50 ▼7.25

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

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
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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 13× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/woo-mahacod-post/mahacod.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/woo-mahacod-post/lib/nusoap/class.xmlschema.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/woo-mahacod-post/maha.pishtaz.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/woo-mahacod-post/lib/nusoap/class.soap_parser.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/woo-mahacod-post/lib/nusoap/class.wsdl.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/woo-mahacod-post/lib/nusoap/class.soap_val.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/woo-mahacod-post/lib/nusoap/class.soapclient.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'WC_mahacod_Pishtaz_Method' not found in wp-content/plugins/woo-mahacod-post/maha.sefareshi.php:2
    • > PHP Warning
      require_once(Mail/mimeDecode.php): failed to open stream: No such file or directory in wp-content/plugins/woo-mahacod-post/lib/nusoap/nusoapmime.php on line 42
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/woo-mahacod-post/lib/nusoap/class.soap_transport_http.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #0 (اضافه شدن گزینه سفارشی و پیشتاز در روش های حمل و نقل), #1 (افزودن فیلد استان و شهرستان و محاسبه هزینه ارسال), #2 (کم کردن فیلد های مورد نیاز برای ثبت سفارش)
The official readme.txt is a good inspiration

woo-mahacod-post/mahacod.php 77% from 13 tests

The entry point to "سرویس خرید پستی ماها" version 2.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 144 characters long)
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-mahacod-post.php" instead of "mahacod.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected14,772 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP228895,16012,174
JavaScript31192,582
CSS20116

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity73.89
▷ Minimum class complexity1.00
▷ Maximum class complexity388.00
Average method complexity8.67
▷ Minimum method complexity1.00
▷ Maximum method complexity82.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes38
▷ Abstract classes00.00%
▷ Concrete classes38100.00%
▷ Final classes00.00%
Methods361
▷ Static methods00.00%
▷ Public methods36099.72%
▷ Protected methods00.00%
▷ Private methods10.28%
Functions11
▷ Named functions11100.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 images were found in this plugin