72% ncs-e-giving-custom-payment-platform

Code Review | NCS E-Giving Custom Payment Platform

WordPress plugin NCS E-Giving Custom Payment Platform scored 72% from 54 tests.

About plugin

  • Plugin page: ncs-e-giving-cust...
  • Plugin version: 1.01
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-3.9
  • WordPress version: 5.8.1
  • First release: Aug 27, 2014
  • Latest release: Sep 4, 2014
  • Number of updates: 10
  • Update frequency: every 3.4 days
  • Top authors: ncs.services (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 582 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
Install script ran successfully

Server metrics [RAM: ▼1.70MB] [CPU: ▼200.88ms] Passed 4 tests

An overview of server-side resources used by NCS E-Giving Custom Payment Platform
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /1.93 ▼0.905.71 ▼37.22
Dashboard /wp-admin1.95 ▼1.119.69 ▼44.37
Posts /wp-admin/edit.php1.95 ▼1.169.76 ▼47.00
Add New Post /wp-admin/post-new.php1.95 ▼3.488.04 ▼674.94
Media Library /wp-admin/upload.php1.95 ▼1.059.10 ▼28.74
E-Giving Settings /wp-admin/options-general.php?page=custom-setting-admin1.955.90

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 120 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by NCS E-Giving Custom Payment Platform
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲13615.93 ▲0.3413.53 ▲2.0451.10 ▼2.01
Dashboard /wp-admin2,972 ▲385.91 ▼0.07166.72 ▼15.06120.99 ▲5.13
Posts /wp-admin/edit.php2,744 ▲52.72 ▼0.0094.02 ▲15.9493.77 ▼7.89
Add New Post /wp-admin/post-new.php1,607 ▲2618.80 ▲0.54424.64 ▲15.45120.80 ▼2.04
Media Library /wp-admin/upload.php1,812 ▲55.05 ▲0.01163.70 ▼9.55126.26 ▼1.52
E-Giving Settings /wp-admin/options-general.php?page=custom-setting-admin1,0882.2276.5775.58

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
You still need to fix the following
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5211
    register_sidebar_widget is deprecated since version 2.8.0! Use wp_register_sidebar_widget() instead.

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=custom-setting-admin
    • > User deprecated in wp-includes/functions.php+5211
    register_sidebar_widget is deprecated since version 2.8.0! Use wp_register_sidebar_widget() instead.
    • > GET request to /wp-admin/options-general.php?page=custom-setting-admin
    • > User deprecated in wp-includes/functions.php+5221
    screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=custom-setting-admin
    • > User deprecated in wp-includes/functions.php+5221
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 0% 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
Almost there! Just fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/ncs-e-giving-custom-payment-platform/trunk/CustomPayment.php
    • > /wp-content/plugins/ncs-e-giving-custom-payment-platform/CustomPayment.php
  • 50× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'NCSSERVICES\\Entity' not found in wp-content/plugins/ncs-e-giving-custom-payment-platform/themefiles/library/Class.Session.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'NCSSERVICES\\Entity' not found in wp-content/plugins/ncs-e-giving-custom-payment-platform/themefiles/library/Class.Funds.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_permalink() in wp-content/plugins/ncs-e-giving-custom-payment-platform/trunk/themefiles/cp-login.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/ncs-e-giving-custom-payment-platform/themefiles/cp-funds-listing-page.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ncs-e-giving-custom-payment-platform/trunk/themefiles/CommonFunctions.php:6
    • > PHP Warning
      Use of undefined constant WS_HOST - assumed 'WS_HOST' (this will throw an Error in a future version of PHP) in wp-content/plugins/ncs-e-giving-custom-payment-platform/trunk/themefiles/library/Class.Funds.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'NCSSERVICES\\Entity' not found in wp-content/plugins/ncs-e-giving-custom-payment-platform/themefiles/library/Class.Schedule.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ncs-e-giving-custom-payment-platform/themefiles/CommonFunctions.php:6
    • > PHP Warning
      Use of undefined constant WS_HOST - assumed 'WS_HOST' (this will throw an Error in a future version of PHP) in wp-content/plugins/ncs-e-giving-custom-payment-platform/themefiles/library/Class.Member.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/ncs-e-giving-custom-payment-platform/themefiles/cp-process-payment-page.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Donate link: Invalid URI ("")
  • Screenshots: These screenshots require images: #1 (Screen-shots/NCS_1.png), #2 (Screen-shots/NCS_2.png), #3 (Screen-shots/NCS_3.png), #4 (Screen-shots/NCS_4.png)
You can look at the official readme.txt

ncs-e-giving-custom-payment-platform/CustomPayment.php 92% from 13 tests

The main file in "NCS E-Giving Custom Payment Platform" v. 1.01 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("ncs-e-giving-custom-payment-platform.php" instead of "CustomPayment.php")

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 detected4,484 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP214516903,232
JavaScript2122423865
CSS314278387

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity5.82
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity2.39
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes22
▷ Abstract classes00.00%
▷ Concrete classes22100.00%
▷ Final classes00.00%
Methods76
▷ Static methods00.00%
▷ Public methods7497.37%
▷ Protected methods00.00%
▷ Private methods22.63%
Functions38
▷ Named functions38100.00%
▷ Anonymous functions00.00%
Constants20
▷ Global constants20100.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
50 PNG files occupy 0.46MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
trunk/assets/images/ui-icons_222222_256x240.png6.76KB4.17KB▼ 38.24%
trunk/assets/images/ui-icons_999999_256x240.png4.27KB4.11KB▼ 3.78%
Screen-shots/NCS_4.png41.65KB13.72KB▼ 67.04%
assets/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%
trunk/assets/images/ui-icons_ffd27a_256x240.png4.44KB4.17KB▼ 6.02%