89% payop-woocommerce

Code Review | PayOp Official

WordPress plugin PayOp Official scored89%from 54 tests.

About plugin

  • Plugin page: payop-woocommerce
  • Plugin version: 2.0.4
  • PHP compatiblity: 5.4.45+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3
  • WordPress version: 6.3.1
  • First release: Mar 14, 2019
  • Latest release: May 4, 2023
  • Number of updates: 68
  • Update frequency: every 22.3 days
  • Top authors: payop (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /4,792 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼5.59ms] Passed 4 tests

Analyzing server-side resources used by PayOp Official
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1136.00 ▼2.03
Dashboard /wp-admin3.41 ▲0.0651.59 ▼8.69
Posts /wp-admin/edit.php3.52 ▲0.1645.95 ▼1.12
Add New Post /wp-admin/post-new.php5.99 ▲0.1081.74 ▼10.50
Media Library /wp-admin/upload.php3.33 ▲0.1034.83 ▲2.73

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

PayOp Official: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.17 ▼1.211.60 ▼0.0238.96 ▼2.27
Dashboard /wp-admin2,203 ▲185.84 ▲0.01108.03 ▲4.4838.75 ▼0.45
Posts /wp-admin/edit.php2,092 ▲32.02 ▼0.0134.96 ▼0.7334.94 ▲1.80
Add New Post /wp-admin/post-new.php1,519 ▼023.42 ▲0.23723.91 ▲80.8155.35 ▼3.66
Media Library /wp-admin/upload.php1,388 ▲94.20 ▼0.02105.11 ▲8.2948.67 ▲1.35

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 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)
Good news, no errors were detected

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

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Contributors: The plugin contributors field is not present
The official readme.txt is a good inspiration

payop-woocommerce/payop.php 85% from 13 tests

The main file in "PayOp Official" v. 2.0.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("payop-woocommerce.php" instead of "payop.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 189 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected763 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP18561430
PO File4112108291
Markdown119042

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity54.00
▷ Minimum class complexity54.00
▷ Maximum class complexity54.00
Average method complexity5.08
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods1292.31%
▷ Protected methods00.00%
▷ Private methods17.69%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
payop.png5.37KB2.71KB▼ 49.55%