90% sadded-by-sadad

Code Review | SADDED By SADAD Payment Gateway

WordPress plugin SADDED By SADAD Payment Gateway scored90%from 54 tests.

About plugin

  • Plugin page: sadded-by-sadad
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4
  • WordPress version: 6.3.1
  • First release: May 31, 2020
  • Latest release: Mar 10, 2021
  • Number of updates: 21
  • Update frequency: every 13.6 days
  • Top authors: sadadbahrain (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,008 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.11ms] Passed 4 tests

A check of server-side resources used by SADDED By SADAD Payment Gateway
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0432.70 ▼5.21
Dashboard /wp-admin3.34 ▲0.0443.53 ▼6.18
Posts /wp-admin/edit.php3.40 ▲0.0447.11 ▲3.21
Add New Post /wp-admin/post-new.php5.93 ▲0.0476.46 ▼11.86
Media Library /wp-admin/upload.php3.27 ▲0.0437.76 ▲2.82

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for SADDED By SADAD Payment Gateway
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.12 ▼0.151.58 ▲0.0341.77 ▲0.30
Dashboard /wp-admin2,202 ▲335.64 ▲0.0194.27 ▼9.5842.38 ▼0.56
Posts /wp-admin/edit.php2,104 ▲41.96 ▼0.0339.22 ▲1.5437.39 ▲3.89
Add New Post /wp-admin/post-new.php1,532 ▲622.98 ▼0.06651.58 ▲9.0356.39 ▼14.11
Media Library /wp-admin/upload.php1,404 ▲44.25 ▲0.06112.02 ▲1.9747.81 ▲1.19

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: sadded, countries, sadadbahrain, country payment, country...

sadded-by-sadad/index.php 92% from 13 tests

"SADDED By SADAD Payment Gateway" version 0.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("sadded-by-sadad.php" instead of "index.php")

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 detected255 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13934255

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.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%
Functions3
▷ Named functions3100.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 images were found in this plugin