84% myfatoorah-woocommerce

Code Review | MyFatoorah - WooCommerce

WordPress plugin MyFatoorah - WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: myfatoorah-woocom...
  • Plugin version: 2.2.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Mar 11, 2021
  • Latest release: Sep 24, 2023
  • Number of updates: 90
  • Update frequency: every 10.3 days
  • Top authors: myfatoorah (100%)

Code review

54 tests

User reviews

1 review

Install metrics

2,000+ active /30,813 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.11ms] Passed 4 tests

An overview of server-side resources used by MyFatoorah - WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.90 ▼0.64
Dashboard /wp-admin3.31 ▲0.0045.37 ▼0.89
Posts /wp-admin/edit.php3.36 ▲0.0041.92 ▼5.57
Add New Post /wp-admin/post-new.php5.89 ▲0.00102.58 ▲14.28
Media Library /wp-admin/upload.php3.23 ▲0.0033.53 ▼5.32

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 35 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for MyFatoorah - WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▲0.191.72 ▲0.0738.86 ▼10.53
Dashboard /wp-admin2,206 ▲174.86 ▼0.09126.37 ▼2.1761.50 ▲15.99
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0438.89 ▲4.0136.07 ▼4.91
Add New Post /wp-admin/post-new.php1,520 ▼1322.94 ▲1.90662.24 ▼73.0758.40 ▼4.83
Media Library /wp-admin/upload.php1,391 ▲94.13 ▼0.09123.95 ▼0.0253.57 ▲4.15

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 16× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_query_arg() in wp-content/plugins/myfatoorah-woocommerce/templates/loader.php:47
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/myfatoorah-woocommerce/templates/sectionGoogle.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/myfatoorah-woocommerce/templates/paymentFieldsEmbedded.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Countries' not found in wp-content/plugins/myfatoorah-woocommerce/includes/admin/shipping.php:6
    • > PHP Notice
      Undefined variable: paymentId in wp-content/plugins/myfatoorah-woocommerce/templates/loader.php on line 42
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/myfatoorah-woocommerce/includes/admin/payment.php:13
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/myfatoorah-woocommerce/templates/paymentFieldsV2.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/myfatoorah-woocommerce/templates/sectionApple.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/myfatoorah-woocommerce/templates/sectionForm.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/myfatoorah-woocommerce/templates/error.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed: Please take inspiration from this readme.txt

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

"MyFatoorah - WooCommerce" version 2.2.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.0" instead of "4.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected2,653 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP214785142,069
PO File1121125256
CSS22631143
JavaScript2175103
JSON10082

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity23.71
▷ Minimum class complexity1.00
▷ Maximum class complexity91.00
Average method complexity4.22
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods122
▷ Static methods1814.75%
▷ Public methods10081.97%
▷ Protected methods129.84%
▷ Private methods108.20%
Functions5
▷ Named functions120.00%
▷ Anonymous functions480.00%
Constants4
▷ Global constants4100.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
4 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/direct.png8.03KB3.42KB▼ 57.45%
assets/images/cards.png8.03KB3.42KB▼ 57.45%
assets/images/embedded.png0.93KB0.29KB▼ 69.21%
assets/images/v2.png0.93KB0.29KB▼ 69.21%