88% nepal-paytime

Code Review | Nepal PayTime

WordPress plugin Nepal PayTime scored 88% from 54 tests.

About plugin

  • Plugin page: nepal-paytime
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Oct 5, 2021
  • Latest release: Oct 5, 2021
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: paytime (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 47 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼0.03MB] [CPU: ▼157.31ms] Passed 4 tests

A check of server-side resources used by Nepal PayTime
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.67 ▼0.1723.17 ▼8.20
Dashboard /wp-admin3.08 ▲0.0250.73 ▲8.54
Posts /wp-admin/edit.php3.13 ▲0.0242.65 ▼1.10
Add New Post /wp-admin/post-new.php5.44 ▲0.0189.16 ▼614.63
Media Library /wp-admin/upload.php3.02 ▲0.0225.98 ▼5.31

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Nepal PayTime
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,249 ▼34715.68 ▲0.160.43 ▼8.328.93 ▼39.99
Dashboard /wp-admin2,966 ▲726.13 ▲0.26176.40 ▲44.63117.77 ▲0.27
Posts /wp-admin/edit.php2,743 ▲42.69 ▼0.0164.83 ▲0.2587.08 ▼9.20
Add New Post /wp-admin/post-new.php1,501 ▼17118.84 ▲0.01368.41 ▼20.48112.73 ▲4.68
Media Library /wp-admin/upload.php1,814 ▲45.00 ▼0.00153.61 ▼1.08117.61 ▼0.14

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/nepal-paytime/paytime.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/nepal-paytime/inc/paytime-gateway.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% 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: woocommerce, payment, paytime, wordpress

nepal-paytime/paytime.php 77% from 13 tests

Analyzing the main PHP file in "Nepal PayTime" version 1.0.0
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("nepal-paytime.php" instead of "paytime.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 165 characters long)
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected402 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP37770315
JavaScript25646
CSS10041

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity12.00
▷ Minimum class complexity10.00
▷ Maximum class complexity14.00
Average method complexity2.16
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/paytime.png18.75KB8.00KB▼ 57.33%