84% livemarket

Code Review | LiveMarket

WordPress plugin LiveMarket scored 84% from 54 tests.

About plugin

  • Plugin page: livemarket
  • Plugin version: 1.7.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.6
  • WordPress version: 5.9.2
  • First release: Jan 23, 2018
  • Latest release: Oct 1, 2020
  • Number of updates: 27
  • Update frequency: every 37.1 days
  • Top authors: zeen101 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,769 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.18MB] [CPU: ▼391.21ms] Passed 4 tests

Server-side resources used by LiveMarket
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.2677.39 ▲18.44
Dashboard /wp-admin3.61 ▲0.2034.74 ▼1.15
Posts /wp-admin/edit.php3.84 ▲0.2041.98 ▲3.08
Add New Post /wp-admin/post-new.php7.08 ▲0.12101.19 ▼1,520.73
Media Library /wp-admin/upload.php3.49 ▲0.1925.21 ▼46.05

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 18 new files
Database: no new tables, 1 new option
New WordPress options
widget_livemarket_promotions

Browser metrics Passed 4 tests

An overview of browser requirements for LiveMarket
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,980 ▲22616.55 ▲0.8810.55 ▲2.175.11 ▲2.53
Dashboard /wp-admin2,918 ▲586.08 ▼0.02134.29 ▲10.09194.07 ▲27.81
Posts /wp-admin/edit.php2,715 ▲213.12 ▼0.1164.04 ▲1.10155.70 ▲5.50
Add New Post /wp-admin/post-new.php1,681 ▼7716.32 ▼5.07411.73 ▼61.91200.36 ▲37.33
Media Library /wp-admin/upload.php1,716 ▲185.50 ▼0.04153.08 ▲0.82217.31 ▲6.69

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • widget_livemarket_promotions

Smoke tests 75% 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)
Even though no errors were found, this is by no means an exhaustive test

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
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/livemarket/lm-ajax.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/livemarket/lm-flyout.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/livemarket/livemarket.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/livemarket/lm-functions.php:62
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/livemarket/lm-shortcodes.php:104
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/livemarket/lm-widgets.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
8 plugin tags: ads, livemarket, advertisement, advertise, live market...

livemarket/livemarket.php Passed 13 tests

The principal PHP file in "LiveMarket" v. 1.7.3 is loaded by WordPress automatically on each request
82 characters long description:
Create a new ad revenue stream with promotions your audience actually wants to see

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin1,412 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP8330276943
CSS2500354
JavaScript2161115

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity14.00
▷ Minimum class complexity2.00
▷ Maximum class complexity27.00
Average method complexity3.05
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/livemarket-16x16.png1.50KB0.56KB▼ 62.43%
images/livemarket-64x64.png6.46KB2.54KB▼ 60.71%
images/LiveMarket_green_v2_hi-2.png5.67KB1.70KB▼ 69.94%
images/livemarket-logo.png3.23KB1.97KB▼ 38.89%