84% wp-payhip-integration

Code Review | WP Payhip Integration

WordPress plugin WP Payhip Integration scored84%from 54 tests.

About plugin

  • Plugin page: wp-payhip-integra...
  • Plugin version: 1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Oct 5, 2020
  • Latest release: Sep 12, 2023
  • Number of updates: 13
  • Update frequency: every 82.5 days
  • Top authors: avantman42 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /1,336 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: ▲0.00MB] [CPU: ▼8.04ms] Passed 4 tests

A check of server-side resources used by WP Payhip Integration
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0132.77 ▼6.84
Dashboard /wp-admin3.31 ▲0.0142.33 ▼3.92
Posts /wp-admin/edit.php3.36 ▲0.0049.02 ▲0.99
Add New Post /wp-admin/post-new.php5.89 ▲0.0076.32 ▼21.99
Media Library /wp-admin/upload.php3.23 ▲0.0034.58 ▲0.59

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for WP Payhip Integration
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,025 ▲26414.40 ▲0.2028.34 ▲26.5037.23 ▼7.41
Dashboard /wp-admin2,195 ▲155.63 ▼0.0498.09 ▲13.0241.84 ▼0.98
Posts /wp-admin/edit.php2,100 ▼02.15 ▲0.2039.85 ▲4.2736.48 ▼5.60
Add New Post /wp-admin/post-new.php1,529 ▲123.70 ▲0.71602.51 ▼53.5748.90 ▼9.76
Media Library /wp-admin/upload.php1,403 ▲34.17 ▼0.0194.13 ▼0.7140.45 ▼9.23

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-payhip-integration/wp-payhip.php:36

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
1 plugin tags: wp_payhip_url

wp-payhip-integration/wp-payhip.php 85% from 13 tests

The main file in "WP Payhip Integration" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-payhip-integration.php" instead of "wp-payhip.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 230 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin30 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript292421
PHP16229

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected