67% marketplacegenie-api

Code Review | Marketplace Genie

WordPress plugin Marketplace Genie scored 67% from 54 tests.

About plugin

  • Plugin page: marketplacegenie-api
  • Plugin version: 3.2.6
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-5.7.1
  • WordPress version: 5.8.1
  • First release: Sep 27, 2018
  • Latest release: May 14, 2021
  • Number of updates: 35
  • Update frequency: every 27.4 days
  • Top authors: marketplacegenie (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 795 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.29MB] [CPU: ▼177.77ms] Passed 4 tests

Server-side resources used by Marketplace Genie
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.12 ▲0.2930.93 ▲3.85
Dashboard /wp-admin3.40 ▲0.3438.34 ▼2.33
Posts /wp-admin/edit.php3.45 ▲0.3435.16 ▲2.01
Add New Post /wp-admin/post-new.php5.70 ▲0.2676.08 ▼712.36
Media Library /wp-admin/upload.php3.28 ▲0.2827.61 ▲1.62

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 56 new files
Database: 4 new tables, 1 new option
New tables
wp_marketplacegenie_settings
wp_marketplacegenie_logs
wp_marketplacegenie_competition
wp_marketplacegenie_orders
New WordPress options
marketplacegenie_db_version

Browser metrics Passed 4 tests

This is an overview of browser requirements for Marketplace Genie
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,779 ▲16816.16 ▲0.527.76 ▲1.4377.28 ▲3.33
Dashboard /wp-admin2,934 ▲386.01 ▼0.19112.66 ▼17.18168.93 ▼1.38
Posts /wp-admin/edit.php2,744 ▲383.24 ▲0.0163.37 ▼1.50142.39 ▲5.66
Add New Post /wp-admin/post-new.php3,739 ▼6318.56 ▲2.75421.29 ▼20.32156.05 ▼15.01
Media Library /wp-admin/upload.php1,756 ▲75.56 ▲0.09136.04 ▼4.98186.74 ▲5.60

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie tables detected upon uninstall: 4 tables
    • wp_marketplacegenie_competition
    • wp_marketplacegenie_settings
    • wp_marketplacegenie_orders
    • wp_marketplacegenie_logs
  • Zombie WordPress options detected upon uninstall: 1 option
    • marketplacegenie_db_version

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 0% 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
The following issues need your attention
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/marketplacegenie-api/public/partials/marketplacegenie-public-display.php
    • > /wp-content/plugins/marketplacegenie-api/includes/activate.php
    • > /wp-content/plugins/marketplacegenie-api/admin/partials/marketplacegenie-admin-display.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/marketplacegenie-api/includes/class-marketplacegenie-install.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (Plugin Setup Page), #2 (API Status)
  • Screenshots: These screenshots need descriptions #0, #0 in marketplacegenie-api/assets to your readme.txt
The official readme.txt is a good inspiration

marketplacegenie-api/marketplacegenie.php 77% from 13 tests

"Marketplace Genie" version 3.2.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("marketplacegenie-api.php" instead of "marketplacegenie.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: Please don't use more than 140 characters for the plugin description (currently 142 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected4,454 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP155745432,228
JavaScript83141801,674
CSS5708445
XML60057
Markdown124050

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity12.43
▷ Minimum class complexity1.00
▷ Maximum class complexity79.00
Average method complexity2.90
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods40
▷ Static methods1742.50%
▷ Public methods3177.50%
▷ Protected methods00.00%
▷ Private methods922.50%
Functions32
▷ Named functions32100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants116.67%
▷ Class constants583.33%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
12 PNG files occupy 0.12MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/takealot-green-256x256.png5.71KB2.38KB▼ 58.44%
img/takealot-16x16.png0.61KB0.62KB0.00%
img/takealot-orange-256x256.png5.71KB2.38KB▼ 58.44%
img/takealot-prime.png5.71KB2.38KB▼ 58.44%
img/takealot-red-16x16.png0.61KB0.62KB0.00%