90% wc-pay-theory

Code Review | WC Pay Theory

WordPress plugin WC Pay Theory scored90%from 54 tests.

About plugin

  • Plugin page: wc-pay-theory
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.2
  • WordPress version: 6.3.1
  • First release: Jun 20, 2023
  • Latest release: Aug 22, 2023
  • Number of updates: 21
  • Update frequency: every 3.2 days
  • Top authors: abelcollins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /261 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: ▼3.79ms] Passed 4 tests

An overview of server-side resources used by WC Pay Theory
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0033.52 ▼9.12
Dashboard /wp-admin3.31 ▲0.0044.84 ▼4.39
Posts /wp-admin/edit.php3.36 ▲0.0046.24 ▼0.25
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.96 ▼1.38
Media Library /wp-admin/upload.php3.23 ▲0.0036.02 ▼0.02

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

WC Pay Theory: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2914.48 ▼0.061.84 ▼0.3041.03 ▼1.98
Dashboard /wp-admin2,206 ▲185.91 ▲1.0194.29 ▼10.2938.96 ▲0.72
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0435.69 ▲0.3533.05 ▼2.24
Add New Post /wp-admin/post-new.php1,535 ▲223.36 ▲0.25649.95 ▲50.1055.98 ▲6.03
Media Library /wp-admin/upload.php1,382 ▼34.41 ▲0.1597.57 ▼0.6440.58 ▼7.59

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Screenshots are stored in the /assets directory.), #2 (This is the second screen shot)
The official readme.txt is a good inspiration

wc-pay-theory/wc-pay-theory.php Passed 13 tests

The principal PHP file in "WC Pay Theory" v. 1.0.4 is loaded by WordPress automatically on each request
66 characters long description:
A plugin enabling Pay Theory as a payment gateway for WooCommerce.

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
Good job! No executable or dangerous file extensions detected597 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript13423306
PHP569113291

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected