83% paydirect-fpx

Code Review | PayDirectFPX

WordPress plugin PayDirectFPX scored83%from 54 tests.

About plugin

  • Plugin page: paydirect-fpx
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6.0-6.3
  • WordPress version: 6.3.1
  • First release: Aug 27, 2019
  • Latest release: Jul 25, 2023
  • Number of updates: 19
  • Update frequency: every 75.2 days
  • Top authors: shahrul1995 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,544 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Server-side resources used by PayDirectFPX
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.98 ▲0.83
Dashboard /wp-admin3.32 ▲0.0148.49 ▼5.73
Posts /wp-admin/edit.php3.37 ▲0.0148.19 ▼3.14
Add New Post /wp-admin/post-new.php5.90 ▲0.01113.89 ▲7.07
Media Library /wp-admin/upload.php3.24 ▲0.0135.37 ▼3.93

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

PayDirectFPX: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5414.80 ▲0.051.87 ▲0.1341.89 ▼3.92
Dashboard /wp-admin2,224 ▲214.90 ▼0.96103.62 ▼17.2443.86 ▼3.50
Posts /wp-admin/edit.php2,097 ▼32.12 ▲0.1036.88 ▼0.7032.16 ▼3.66
Add New Post /wp-admin/post-new.php1,556 ▲1618.20 ▼4.75619.53 ▼45.5356.06 ▲2.05
Media Library /wp-admin/upload.php1,400 ▼04.25 ▼0.19107.06 ▲0.2144.60 ▼5.52

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • 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)
Good news, no errors were detected

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 fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/paydirect-fpx/src/paydirectfpx.php:6

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention: Please take inspiration from this readme.txt

paydirect-fpx/index.php 85% from 13 tests

The entry point to "PayDirectFPX" version 1.0.2 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.3" instead of "2.6.0")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("paydirect-fpx.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin523 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP211635523

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity99.00
▷ Minimum class complexity99.00
▷ Maximum class complexity99.00
Average method complexity13.25
▷ Minimum method complexity1.00
▷ Maximum method complexity95.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin