83% modenapaymentgateway

Code Review | Modena Payment Gateway

WordPress plugin Modena Payment Gateway scored83%from 54 tests.

About plugin

  • Plugin page: modenapaymentgateway
  • Plugin version: 2.9.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-8.2.2
  • WordPress version: 6.3.1
  • First release: Nov 17, 2022
  • Latest release: Nov 24, 2023
  • Number of updates: 24
  • Update frequency: every 15.6 days
  • Top authors: renemodena (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /676 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

Analyzing server-side resources used by Modena Payment Gateway
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0937.73 ▼2.32
Dashboard /wp-admin3.39 ▲0.0948.93 ▼6.36
Posts /wp-admin/edit.php3.51 ▲0.1548.06 ▼1.90
Add New Post /wp-admin/post-new.php5.98 ▲0.0985.69 ▼2.24
Media Library /wp-admin/upload.php3.32 ▲0.0935.77 ▲1.23

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Modena Payment Gateway
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4214.67 ▲0.431.77 ▲0.1338.36 ▼5.79
Dashboard /wp-admin2,212 ▲415.60 ▼0.0795.19 ▼2.6145.78 ▲2.35
Posts /wp-admin/edit.php2,115 ▲151.99 ▼0.0341.16 ▲3.9237.20 ▲6.81
Add New Post /wp-admin/post-new.php1,535 ▲923.55 ▲0.49678.69 ▲67.4651.01 ▼6.90
Media Library /wp-admin/upload.php1,411 ▲114.20 ▲0.04106.28 ▲9.7146.77 ▲6.31

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Modena\\Payment\\model\\ModenaBaseModel' not found in wp-content/plugins/modenapaymentgateway/lib/model/ModenaOrderItem.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Modena\\Payment\\model\\ModenaBaseModel' not found in wp-content/plugins/modenapaymentgateway/lib/model/ModenaCustomer.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Modena\\Payment\\model\\ModenaBaseModel' not found in wp-content/plugins/modenapaymentgateway/lib/model/ModenaApplication.php:5

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 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
  • Screenshots: These screenshots require images: #2 (Credit Payments), #3 (Pay In 3), #4 (Try Now Pay Later)
You can take inspiration from this readme.txt

modenapaymentgateway/modena.php 85% from 13 tests

Analyzing the main PHP file in "Modena Payment Gateway" version 2.9.4
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 149 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("modenapaymentgateway.php" instead of "modena.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin1,658 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP232773171,519
CSS22018125
JavaScript12014

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity7.05
▷ Minimum class complexity1.00
▷ Maximum class complexity62.00
Average method complexity2.06
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes21
▷ Abstract classes14.76%
▷ Concrete classes2095.24%
▷ Final classes00.00%
Methods122
▷ Static methods54.10%
▷ Public methods8267.21%
▷ Protected methods1310.66%
▷ Private methods2722.13%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants29
▷ Global constants26.90%
▷ Class constants2793.10%
▷ Public constants2592.59%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected