83% ems-payments-for-woocommerce

Code Review | Deprecated EMS Pay for WooCommerce plugin

WordPress plugin Deprecated EMS Pay for WooCommerce plugin scored83%from 54 tests.

About plugin

  • Plugin page: ems-payments-for-...
  • Plugin version: 1.1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.2
  • WordPress version: 6.3.1
  • First release: Mar 24, 2017
  • Latest release: Dec 10, 2020
  • Number of updates: 43
  • Update frequency: every 31.7 days
  • Top authors: emspay (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

60+ active /3,492 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.81ms] Passed 4 tests

Analyzing server-side resources used by Deprecated EMS Pay for WooCommerce plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.42 ▼1.03
Dashboard /wp-admin3.31 ▲0.0050.27 ▼2.26
Posts /wp-admin/edit.php3.36 ▲0.0049.96 ▲0.84
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.77 ▼24.75
Media Library /wp-admin/upload.php3.23 ▲0.0032.35 ▼3.21

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Deprecated EMS Pay for WooCommerce plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.22 ▼1.161.70 ▼0.5740.58 ▼1.45
Dashboard /wp-admin2,206 ▲155.88 ▲0.03107.88 ▲4.8255.88 ▲13.01
Posts /wp-admin/edit.php2,089 ▲31.99 ▼0.1536.90 ▼0.0534.19 ▼2.02
Add New Post /wp-admin/post-new.php1,533 ▲1923.19 ▲5.67681.05 ▲48.2548.30 ▼11.35
Media Library /wp-admin/upload.php1,391 ▼04.25 ▲0.0298.70 ▼4.6144.73 ▼2.24

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/ems-payments-for-woocommerce/includes/core/example.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 24 tag instead of maximum 10
You can take inspiration from this readme.txt

ems-payments-for-woocommerce/ems-payments-for-woocommerce.php 85% from 13 tests

The main file in "Deprecated EMS Pay for WooCommerce plugin" v. 1.1.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Requires at least: The required version number must match the one declared in readme.txt ("4.4" instead of "3.0")

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
Good job! No executable or dangerous file extensions detected2,351 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP216027122,212
Markdown219064
Bourne Shell120961
JavaScript13414

PHP code Passed 2 tests

Analyzing 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.25
Average class complexity10.56
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity1.87
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes18
▷ Abstract classes15.56%
▷ Concrete classes1794.44%
▷ Final classes211.76%
Methods202
▷ Static methods2914.36%
▷ Public methods10853.47%
▷ Protected methods8039.60%
▷ Private methods146.93%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants47
▷ Global constants36.38%
▷ Class constants4493.62%
▷ Public constants44100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
14 PNG files occupy 0.43MB with 0.24MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icons/discover.png3.75KB1.66KB▼ 55.60%
assets/images/icons/bancontact.png4.10KB1.73KB▼ 57.91%
assets/icon-256x256.png17.06KB6.92KB▼ 59.44%
assets/images/icons/klarna.png2.93KB1.23KB▼ 58.14%
assets/images/icons/masterpass.png3.97KB1.88KB▼ 52.67%