84% paysley

Code Review | Paysley

WordPress plugin Paysley scored84%from 54 tests.

About plugin

  • Plugin page: paysley
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 6.3.1
  • First release: Nov 10, 2020
  • Latest release: Jan 29, 2022
  • Number of updates: 12
  • Update frequency: every 37.5 days
  • Top authors: paysley (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /537 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
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.42ms] Passed 4 tests

Server-side resources used by Paysley
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0139.65 ▼0.17
Dashboard /wp-admin3.32 ▲0.0147.11 ▼4.19
Posts /wp-admin/edit.php3.37 ▲0.0143.53 ▼7.87
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.89 ▼17.46
Media Library /wp-admin/upload.php3.24 ▲0.0135.18 ▲0.66

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 43 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
paysley_plugin_version
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Paysley
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.71 ▼0.591.82 ▲0.0245.36 ▼0.53
Dashboard /wp-admin2,206 ▲184.86 ▼0.01106.49 ▼6.3941.01 ▼4.22
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0137.99 ▼4.5633.18 ▼3.47
Add New Post /wp-admin/post-new.php1,532 ▲1823.47 ▲5.73650.20 ▼41.7759.54 ▼4.48
Media Library /wp-admin/upload.php1,385 ▼64.23 ▲0.03101.10 ▼9.6744.03 ▼2.86

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Unterminated comment starting line 2 in wp-content/plugins/paysley/index.php on line 2

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)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: paysley, apple pay, payment method, payment gateway, credit card...

paysley/paysley.php Passed 13 tests

The main PHP file in "Paysley" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
31 characters long description:
Receive payments using Paysley.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin1,623 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PO File183603601,227
PHP481242396

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity26.50
▷ Minimum class complexity5.00
▷ Maximum class complexity48.00
Average method complexity3.43
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods21
▷ Static methods628.57%
▷ Public methods1885.71%
▷ Protected methods314.29%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/py-logo.png0.81KB0.81KB0.24%