83% smobilplay-edd-gateway

Code Review | SmobilPay for e-commerce Gateway for Easy Digital Downloads

WordPress plugin SmobilPay for e-commerce Gateway for Easy Digital Downloads scored83%from 54 tests.

About plugin

  • Plugin page: smobilplay-edd-ga...
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0-5.8.2
  • WordPress version: 6.3.1
  • First release: Oct 23, 2021
  • Latest release: Nov 16, 2021
  • Number of updates: 7
  • Update frequency: every 3.9 days
  • Top authors: maviance (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /403 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
Install script ran successfully

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

Server-side resources used by SmobilPay for e-commerce Gateway for Easy Digital Downloads
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0643.24 ▲2.39
Dashboard /wp-admin3.37 ▼0.0649.02 ▼901.94
Posts /wp-admin/edit.php3.48 ▲0.1260.82 ▲13.33
Add New Post /wp-admin/post-new.php5.95 ▲0.0698.02 ▲11.75
Media Library /wp-admin/upload.php3.29 ▲0.0637.16 ▼1.66

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 529 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by SmobilPay for e-commerce Gateway for Easy Digital Downloads
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.33 ▼0.042.01 ▲0.0946.49 ▲4.09
Dashboard /wp-admin2,189 ▼135.62 ▼0.0994.25 ▼4.8441.36 ▼4.82
Posts /wp-admin/edit.php2,103 ▲31.99 ▼0.0041.39 ▲5.2536.83 ▲3.00
Add New Post /wp-admin/post-new.php1,531 ▲323.09 ▲0.09666.51 ▲1.9175.27 ▲16.84
Media Library /wp-admin/upload.php1,400 ▼04.18 ▼0.0296.42 ▼13.3044.91 ▼4.53

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

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
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 167× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\ResponseInterface' not found in wp-content/plugins/smobilplay-edd-gateway/vendor/guzzlehttp/psr7/src/Response.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Dotenv\\Repository\\Adapter\\WriterInterface' not found in wp-content/plugins/smobilplay-edd-gateway/vendor/vlucas/phpdotenv/src/Repository/Adapter/GuardedWriter.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Cache\\Adapter\\AbstractAdapter' not found in wp-content/plugins/smobilplay-edd-gateway/vendor/symfony/cache/Adapter/ApcuAdapter.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Contracts\\Cache\\ItemInterface' not found in wp-content/plugins/smobilplay-edd-gateway/vendor/symfony/cache/CacheItem.php:22
    • > PHP Warning
      require_once(wp-content/plugins/smobilplay-edd-gateway/vendor/camoo/enkap-oauth/vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/smobilplay-edd-gateway/vendor/camoo/enkap-oauth/tests/bootstrap.php on line 7
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/smobilplay-edd-gateway/vendor/psr/http-message/src/RequestInterface.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Enkap\\OAuth\\Model\\BaseModel' not found in wp-content/plugins/smobilplay-edd-gateway/vendor/camoo/enkap-oauth/src/Model/Payment.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'GrahamCampbell\\ResultType\\Result' not found in wp-content/plugins/smobilplay-edd-gateway/vendor/graham-campbell/result-type/src/Error.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/smobilplay-edd-gateway/vendor/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/smobilplay-edd-gateway/vendor/guzzlehttp/psr7/src/DroppingStream.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Tags: There are too many tags (14 tag instead of maximum 10)
The official readme.txt might help

smobilplay-edd-gateway/smobilplay-edd-gateway.php 77% from 13 tests

The entry point to "SmobilPay for e-commerce Gateway for Easy Digital Downloads" version 1.0.2 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Domain Path: The domain path folder was not found ("/languages")
  • Requires at least: Required version does not match the one declared in readme.txt ("4.7" instead of "2.0")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin38,999 lines of code in 475 files:
LanguageFilesBlank linesComment linesLines of code
PHP3845,55213,66428,953
Markdown462,10206,613
JSON36103,281
make320451
YAML332850
SQL10029
XML10019
Bourne Shell1203

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity12.56
▷ Minimum class complexity1.00
▷ Maximum class complexity208.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity51.00
Code structure
Namespaces63
Interfaces64
Traits14
Classes248
▷ Abstract classes83.23%
▷ Concrete classes24096.77%
▷ Final classes9439.17%
Methods1,949
▷ Static methods41221.14%
▷ Public methods1,56380.19%
▷ Protected methods1527.80%
▷ Private methods23412.01%
Functions355
▷ Named functions14340.28%
▷ Anonymous functions21259.72%
Constants192
▷ Global constants84.17%
▷ Class constants18495.83%
▷ Public constants13171.20%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/e-nkap.png2.32KB2.37KB0.00%