93% wpexperts-square-for-give

Code Review | WPExperts Square For GiveWP

WordPress plugin WPExperts Square For GiveWP scored 93% from 54 tests.

About plugin

  • Plugin page: wpexperts-square-...
  • Plugin version: 1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.8
  • WordPress version: 5.8.1
  • First release: Aug 12, 2020
  • Latest release: Nov 10, 2021
  • Number of updates: 18
  • Update frequency: every 25.3 days
  • Top authors: wpexpertsio (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 734 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.11MB] [CPU: ▼148.83ms] Passed 4 tests

A check of server-side resources used by WPExperts Square For GiveWP
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.1729.74 ▲8.23
Dashboard /wp-admin3.03 ▼0.0335.42 ▼4.69
Posts /wp-admin/edit.php3.08 ▼0.0234.86 ▼5.13
Add New Post /wp-admin/post-new.php5.03 ▼0.4074.49 ▼573.98
Media Library /wp-admin/upload.php3.03 ▲0.0227.46 ▼11.53

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 1,780 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for WPExperts Square For GiveWP
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,711 ▲11516.02 ▲0.498.06 ▼1.3546.94 ▼0.21
Dashboard /wp-admin3,005 ▲716.16 ▲0.21141.00 ▲6.85114.00 ▲0.77
Posts /wp-admin/edit.php2,768 ▲292.82 ▲0.1468.32 ▲2.8896.84 ▲0.08
Add New Post /wp-admin/post-new.php1,528 ▼14418.57 ▼0.37361.72 ▼14.79128.48 ▲21.17
Media Library /wp-admin/upload.php1,839 ▲295.05 ▲0.04148.25 ▲1.66121.68 ▲2.29

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
  • 595× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wpexperts-square-for-give/lib/square-sdk/test/Model/V1ListCategoriesRequestTest.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wpexperts-square-for-give/lib/square-sdk/test/Model/SourceApplicationTest.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wpexperts-square-for-give/lib/square-sdk/test/Model/AdditionalRecipientReceivableTest.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wpexperts-square-for-give/lib/square-sdk/test/Model/OrderFulfillmentTest.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wpexperts-square-for-give/lib/square-sdk/test/Model/ListMerchantsResponseTest.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wpexperts-square-for-give/lib/square-sdk/test/Model/CatalogCustomAttributeDefinitionSelectionConfigTest.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wpexperts-square-for-give/lib/square-sdk/test/Model/V1DeleteDiscountRequestTest.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wpexperts-square-for-give/lib/square-sdk/test/Model/CustomerSortTest.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wpexperts-square-for-give/lib/square-sdk/test/Model/SearchOrdersCustomerFilterTest.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wpexperts-square-for-give/lib/square-sdk/test/Model/CreateCustomerResponseTest.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

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 your attention: You can take inspiration from this readme.txt

wpexperts-square-for-give/givewp-square.php 77% from 13 tests

The main PHP script in "WPExperts Square For GiveWP" version 1.2 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wpexperts-square-for-give.php" instead of "givewp-square.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: Please keep the plugin description shorter than 140 characters (currently 340 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin91,532 lines of code in 1,776 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,18216,82175,84776,556
Markdown5846,455014,334
JavaScript732077529
CSS117359
JSON10036
YAML10018

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity5.05
▷ Minimum class complexity1.00
▷ Maximum class complexity473.00
Average method complexity1.52
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes1,180
▷ Abstract classes00.00%
▷ Concrete classes1,180100.00%
▷ Final classes10.08%
Methods9,193
▷ Static methods1,18712.91%
▷ Public methods9,18499.90%
▷ Protected methods80.09%
▷ Private methods10.01%
Functions6
▷ Named functions00.00%
▷ Anonymous functions6100.00%
Constants12
▷ Global constants541.67%
▷ Class constants758.33%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin