10% mijireh-checkout-for-ninja-forms

Code Review | Mijireh Checkout for Ninja Forms

WordPress plugin Mijireh Checkout for Ninja Forms scored10%from 54 tests.

About plugin

  • Plugin page: mijireh-checkout-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.0
  • WordPress version: 6.3.1
  • First release: Oct 16, 2014
  • Latest release: Oct 16, 2014
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: patsatech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /996 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/mijireh-checkout-for-ninja-forms/includes/activation.php+5
    Use of undefined constant NINJA_FORMS_SUBS_TABLE_NAME - assumed 'NINJA_FORMS_SUBS_TABLE_NAME' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▲0.12MB] [CPU: ▼4.85ms] Passed 4 tests

Server-side resources used by Mijireh Checkout for Ninja Forms
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1141.73 ▼4.33
Dashboard /wp-admin3.43 ▲0.1349.35 ▼6.40
Posts /wp-admin/edit.php3.54 ▲0.1949.96 ▲1.08
Add New Post /wp-admin/post-new.php6.01 ▲0.1388.38 ▼9.76
Media Library /wp-admin/upload.php3.35 ▲0.1237.83 ▲3.04
Mijireh Checkout /wp-admin/admin.php?page=nf-mijireh-patsatech3.1630.53

Server storage [IO: ▲0.37MB] [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: 26 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Mijireh Checkout for Ninja Forms: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.20 ▼1.102.29 ▼0.5844.11 ▼2.11
Dashboard /wp-admin2,209 ▲185.89 ▲0.0097.54 ▼4.5539.78 ▼3.02
Posts /wp-admin/edit.php2,089 ▲31.99 ▼0.0436.59 ▲2.0134.35 ▼0.06
Add New Post /wp-admin/post-new.php1,533 ▲1923.13 ▼0.33657.58 ▼15.6355.45 ▲1.26
Media Library /wp-admin/upload.php1,391 ▲64.22 ▲0.0395.43 ▼5.6644.68 ▼0.82
Mijireh Checkout /wp-admin/admin.php?page=nf-mijireh-patsatech7402.0523.5321.09

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=nf-mijireh-patsatech
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'ninja_forms_admin_css' not found or invalid function name
    • > GET request to /wp-admin/admin.php?page=nf-mijireh-patsatech
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'ninja_forms_admin_js' not found or invalid function name
    • > GET request to /wp-admin/admin.php?page=nf-mijireh-patsatech
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'ninja_forms_admin' not found or invalid function name

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
Almost there! Just fix the following items
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mijireh-checkout-for-ninja-forms/classes/class-mijireh-settings.php:212
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/mijireh-checkout-for-ninja-forms/mijireh.php:22
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/mijireh-checkout-for-ninja-forms/mijireh.php on line 21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mijireh-checkout-for-ninja-forms/classes/class-mijireh-response.php:197
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mijireh-checkout-for-ninja-forms/classes/class-mijireh-subs.php:189
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mijireh-checkout-for-ninja-forms/classes/class-mijireh-checkout.php:363
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/mijireh-checkout-for-ninja-forms/includes/shortcodes.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Add an image for screenshot #1 (Configuration Screen of Mijireh Checkout)
Please take inspiration from this readme.txt

mijireh-checkout-for-ninja-forms/mijireh.php 77% from 13 tests

Analyzing the main PHP file in "Mijireh Checkout for Ninja Forms" version 1.0.0
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder does not exist ("/lang/")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("mijireh-checkout-for-ninja-forms.php" instead of "mijireh.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
Everything looks great! No dangerous files found in this plugin1,605 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP163454151,411
CSS111153
JavaScript18241

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity7.58
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity3.24
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes31
▷ Abstract classes00.00%
▷ Concrete classes31100.00%
▷ Final classes00.00%
Methods91
▷ Static methods33.30%
▷ Public methods7784.62%
▷ Protected methods55.49%
▷ Private methods99.89%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.07MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/mijireh-checkout-logo.png55.23KB14.35KB▼ 74.02%
assets/images/mijireh.png1.82KB1.48KB▼ 18.71%
assets/images/credit_cards.png4.98KB2.14KB▼ 57.03%
assets/images/mijireh-logo.png5.66KB5.73KB0.00%