83% raudhah-pay-for-woocommerce

Code Review | Raudhah Pay For Woocommerce

WordPress plugin Raudhah Pay For Woocommerce scored 83% from 54 tests.

About plugin

  • Plugin page: raudhah-pay-for-w...
  • Plugin version: 0.1.0.8
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: Oct 24, 2019
  • Latest release: Dec 12, 2019
  • Number of updates: 9
  • Update frequency: every 5.5 days
  • Top authors: syedrp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 1,066 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼0.93ms] Passed 4 tests

This is a short check of server-side resources used by Raudhah Pay For Woocommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1038.22 ▼3.58
Dashboard /wp-admin3.40 ▲0.1047.86 ▼1.30
Posts /wp-admin/edit.php3.51 ▲0.1546.04 ▼2.35
Add New Post /wp-admin/post-new.php5.98 ▲0.0993.13 ▲5.45
Media Library /wp-admin/upload.php3.32 ▲0.0936.58 ▲3.51

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Raudhah Pay For Woocommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲7213.15 ▼1.221.60 ▼0.3239.92 ▼3.98
Dashboard /wp-admin2,216 ▲304.87 ▼0.07103.24 ▼6.6241.88 ▲0.40
Posts /wp-admin/edit.php2,095 ▲62.02 ▼0.0036.61 ▼0.9634.70 ▲1.97
Add New Post /wp-admin/post-new.php1,546 ▲2723.31 ▲0.08606.71 ▼165.3364.99 ▲11.63
Media Library /wp-admin/upload.php1,398 ▲104.21 ▼0.0094.70 ▼23.1842.37 ▼8.96

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

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
Even though no errors were found, this is by no means an exhaustive test

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 fix the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/raudhah-pay-for-woocommerce/raudhahpay.php:350
    • > PHP Fatal error
      Uncaught Error: Class 'RaudhahPayConnect' not found in wp-content/plugins/raudhah-pay-for-woocommerce/includes/RaudhahPayApi.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 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
2 plugin tags: comments, spam

raudhah-pay-for-woocommerce/raudhahpay.php 69% from 13 tests

The entry point to "Raudhah Pay For Woocommerce" version 0.1.0.8 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("raudhah-pay-for-woocommerce.php" instead of "raudhahpay.php")
  • Requires PHP: Required version does not match the one declared in readme.txt ("5.2.4" instead of "7.0")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Domain Path: The domain path folder was not found ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected615 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP611821601
Markdown18014

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity10.80
▷ Minimum class complexity1.00
▷ Maximum class complexity31.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes120.00%
▷ Concrete classes480.00%
▷ Final classes00.00%
Methods43
▷ Static methods24.65%
▷ Public methods1739.53%
▷ Protected methods49.30%
▷ Private methods2251.16%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants6
▷ Global constants00.00%
▷ Class constants6100.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/payment-options.png20.32KB6.80KB▼ 66.51%