10% ekoma

Code Review | Ekoma: Loyalty & Referrals

WordPress plugin Ekoma: Loyalty & Referrals scored10%from 54 tests.

About plugin

  • Plugin page: ekoma
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.2
  • WordPress version: 6.3.1
  • First release: Jul 30, 2019
  • Latest release: Aug 2, 2019
  • Number of updates: 8
  • Update frequency: every 0.4 days
  • Top authors: ekoma88 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /965 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • Install procedure had errors
    • > User error in wp-content/plugins/ekoma/includes/class-ekoma-activator.php+36
    Your website must use HTTPS (with a valid SSL).

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

A check of server-side resources used by Ekoma: Loyalty & Referrals
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.78 ▼2.70
Dashboard /wp-admin3.32 ▲0.0141.62 ▼4.04
Posts /wp-admin/edit.php3.37 ▲0.0145.21 ▲2.65
Add New Post /wp-admin/post-new.php5.90 ▲0.0179.14 ▼20.77
Media Library /wp-admin/upload.php3.24 ▲0.0131.79 ▼1.27

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Ekoma: Loyalty & Referrals: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲7413.19 ▼1.061.69 ▼0.2336.15 ▼7.29
Dashboard /wp-admin2,225 ▲374.87 ▼1.00111.98 ▲11.2942.27 ▲1.98
Posts /wp-admin/edit.php2,108 ▲162.00 ▼0.0540.44 ▲0.7837.36 ▲2.79
Add New Post /wp-admin/post-new.php1,546 ▲423.23 ▲4.89674.30 ▲68.9050.98 ▼4.63
Media Library /wp-admin/upload.php1,404 ▲134.22 ▲0.0592.27 ▼12.7040.66 ▼2.21

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/ekoma/admin/partials/ekoma-admin-display.php
    • > /wp-content/plugins/ekoma/public/partials/ekoma-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: customers, points, woocommerce, referral, loyalty...

ekoma/ekoma.php 92% from 13 tests

The main PHP script in "Ekoma: Loyalty & Referrals" version 1.0.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 220 characters long)

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 plugin355 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12122514346
JavaScript24546
SVG1003
CSS2080

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity5.86
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity2.21
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods28
▷ Static methods27.14%
▷ Public methods2278.57%
▷ Protected methods13.57%
▷ Private methods517.86%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
8 PNG files occupy 1.67MB with 0.91MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png2.54KB1.21KB▼ 52.65%
assets/icon-256x256.png5.22KB3.13KB▼ 40.03%
assets/screenshot-1.png393.39KB151.45KB▼ 61.50%
assets/screenshot-5.png263.08KB112.05KB▼ 57.41%
assets/screenshot-6.png376.25KB142.79KB▼ 62.05%