84% payper

Code Review | Payper widget

WordPress plugin Payper widget scored 84% from 54 tests.

About plugin

  • Plugin page: payper
  • Plugin version: 0.1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.1.1
  • WordPress version: 6.3.1
  • First release: Apr 20, 2023
  • Latest release: Apr 20, 2023
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: bepayper (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 77 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.33MB] [CPU: ▼18.44ms] Passed 4 tests

This is a short check of server-side resources used by Payper widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.43 ▼0.0333.56 ▼11.96
Dashboard /wp-admin3.29 ▼0.0137.32 ▼15.56
Posts /wp-admin/edit.php3.33 ▼0.0340.08 ▼7.00
Add New Post /wp-admin/post-new.php4.64 ▼1.2549.22 ▼39.22
Media Library /wp-admin/upload.php3.28 ▲0.0534.25 ▲1.10

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

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

Browser metrics Passed 4 tests

Payper widget: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲8013.23 ▼1.144.80 ▲2.9340.68 ▼9.15
Dashboard /wp-admin2,218 ▲305.82 ▲0.9397.37 ▼6.1283.48 ▲38.80
Posts /wp-admin/edit.php2,104 ▲151.98 ▼0.0435.50 ▼0.8432.62 ▼2.29
Add New Post /wp-admin/post-new.php6,455 ▲4,91820.11 ▼3.03997.82 ▲314.4757.96 ▲1.22
Media Library /wp-admin/upload.php1,400 ▲94.18 ▼0.0598.59 ▼1.7681.85 ▲34.70

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Please take a closer look at the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/payper/includes/settings.php:113
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/payper/includes/adminbox.php:67

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: paywall, blocks, monetization, gutenberg

payper/wp-payper.php 92% from 13 tests

The entry point to "Payper widget" version 0.1.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("payper.php" instead of "wp-payper.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin300 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP36586300

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.23
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity2.00
▷ Minimum method complexity2.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes1100.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods3
▷ Static methods3100.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
payper_16x16.png0.39KB0.29KB▼ 25.69%