83% near-pay

Code Review | Near Pay

WordPress plugin Near Pay scored 83% from 54 tests.

About plugin

  • Plugin page: near-pay
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.9
  • WordPress version: 6.3.1
  • First release: Feb 17, 2022
  • Latest release: Feb 17, 2022
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: vlodkow (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 277 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Near Pay
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.02 ▼0.40
Dashboard /wp-admin3.31 ▲0.0148.07 ▼3.11
Posts /wp-admin/edit.php3.36 ▲0.0146.33 ▼1.49
Add New Post /wp-admin/post-new.php5.89 ▲0.0197.43 ▲7.01
Media Library /wp-admin/upload.php3.24 ▲0.0134.87 ▲1.85

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Near Pay: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲8913.22 ▼1.361.64 ▼0.0142.73 ▲0.00
Dashboard /wp-admin2,227 ▲365.86 ▼0.19100.57 ▲1.2642.89 ▲0.35
Posts /wp-admin/edit.php2,110 ▲212.01 ▲0.0141.13 ▲6.8634.85 ▲0.99
Add New Post /wp-admin/post-new.php1,543 ▲2023.40 ▲0.19635.31 ▼41.1154.71 ▼2.66
Media Library /wp-admin/upload.php1,403 ▲184.15 ▼0.11102.49 ▲8.1844.52 ▲1.67

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× 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/near-pay/index.php:16

User-side errors Passed 1 test

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

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
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Plugin settings.), #2 (Button that allow to make a payment to your NEAR wallet.)
You can take inspiration from this readme.txt

near-pay/index.php 85% from 13 tests

The principal PHP file in "Near Pay" v. 1.0.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("near-pay.php" instead of "index.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 349 characters long)

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
Good job! No executable or dangerous file extensions detected1,416 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript28801,227
PHP11313133
CSS212056

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected