84% pics-payment-gateway

Code Review | Pics Payment Gateway

WordPress plugin Pics Payment Gateway scored84%from 54 tests.

About plugin

  • Plugin page: pics-payment-gateway
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.4.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.5
  • WordPress version: 6.3.1
  • First release: Dec 7, 2020
  • Latest release: Dec 8, 2020
  • Number of updates: 6
  • Update frequency: every 0.8 days
  • Top authors: vtssupport (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /321 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.41ms] Passed 4 tests

Server-side resources used by Pics Payment Gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0641.00 ▼7.34
Dashboard /wp-admin3.37 ▲0.0253.05 ▼9.75
Posts /wp-admin/edit.php3.42 ▲0.0651.00 ▲1.17
Add New Post /wp-admin/post-new.php5.95 ▲0.0684.39 ▼13.71
Media Library /wp-admin/upload.php3.29 ▲0.0640.63 ▲3.33

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Pics Payment Gateway: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.71 ▲0.111.69 ▼0.0845.15 ▲2.62
Dashboard /wp-admin2,195 ▲215.65 ▼0.0382.01 ▼11.8838.97 ▼5.81
Posts /wp-admin/edit.php2,100 ▼31.97 ▼0.0635.72 ▲0.9532.43 ▼3.58
Add New Post /wp-admin/post-new.php1,530 ▼322.99 ▼0.08676.89 ▲13.5657.41 ▲7.67
Media Library /wp-admin/upload.php1,403 ▲34.11 ▼0.11103.72 ▼11.2143.71 ▼6.87

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pics-payment-gateway/index.php:10

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 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: pics, payments, sri lanka, online

pics-payment-gateway/index.php 85% from 13 tests

The primary PHP file in "Pics Payment Gateway" version 1.0.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 146 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("pics-payment-gateway.php" instead of "index.php")

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
Good job! No executable or dangerous file extensions detected362 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP16468341
JavaScript15016
CSS1005

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity29.00
▷ Minimum class complexity29.00
▷ Maximum class complexity29.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods1392.86%
▷ Protected methods00.00%
▷ Private methods17.14%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.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