72% wp-livephp

Code Review | WP Live.php

WordPress plugin WP Live.php scored 72% from 54 tests.

About plugin

  • Plugin page: wp-livephp
  • Plugin version: 1.6.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-3.8
  • WordPress version: 5.9.2
  • First release: Dec 10, 2011
  • Latest release: Jan 15, 2014
  • Number of updates: 29
  • Update frequency: every 26.5 days
  • Top authors: mbence (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

30+ active / 4,629 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by WP Live.php
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0552.58 ▲2.15
Dashboard /wp-admin3.43 ▲0.0331.23 ▼1.31
Posts /wp-admin/edit.php3.66 ▲0.0234.08 ▼1.97
Add New Post /wp-admin/post-new.php6.90 ▼0.0795.38 ▼1,176.66
Media Library /wp-admin/upload.php3.31 ▲0.0225.14 ▲2.47
WP Live.php /wp-admin/options-general.php?page=wp-livephp3.3221.80

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 1 new option
New WordPress options
wp-livephp

Browser metrics Passed 4 tests

An overview of browser requirements for WP Live.php
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,838 ▲8415.90 ▲0.236.00 ▼0.192.64 ▼0.16
Dashboard /wp-admin2,911 ▲536.17 ▼0.05115.48 ▼18.60156.05 ▼8.63
Posts /wp-admin/edit.php2,713 ▲563.25 ▲0.0162.27 ▼1.91137.36 ▼7.83
Add New Post /wp-admin/post-new.php1,679 ▲1816.33 ▲0.13427.22 ▲13.89299.90 ▲146.15
Media Library /wp-admin/upload.php1,714 ▲135.54 ▲0.01143.07 ▲9.12216.95 ▲35.43
WP Live.php /wp-admin/options-general.php?page=wp-livephp1,3232.4055.72118.03

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
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/wp-livephp/wp-live.php+213
    unlink(wp-content/uploads/wp-live-contentcheck.txt): No such file or directory

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=wp-livephp
    • > User deprecated in wp-includes/functions.php+5326
    screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=wp-livephp
    • > User deprecated in wp-includes/functions.php+5326
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/wp-livephp/wp-live-settings.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-livephp/wp-live.php:42

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=wp-livephp
    • > Network (severe)
    https://button.flattr.com/flattr-badge-large.png - Failed to load resource: the server responded with a status of 404 ()

Optimizations

Plugin configuration 93% 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:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Settings page), #2 (Admin bar integration)
Please take inspiration from this readme.txt

wp-livephp/wp-live.php 92% from 13 tests

The main file in "WP Live.php" v. 1.6.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-livephp.php" instead of "wp-live.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin593 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP348118505
JavaScript1171888

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity25.00
▷ Minimum class complexity21.00
▷ Maximum class complexity29.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods1062.50%
▷ Protected methods637.50%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
6 PNG files occupy 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png1.05KB1.01KB▼ 4.00%
images/live-logo.png1.08KB0.96KB▼ 10.91%
images/iphone_switch_container_off.png1.76KB0.26KB▼ 85.24%
images/iphone_switch.png2.66KB2.01KB▼ 24.54%
screenshot-1.png75.41KB37.41KB▼ 50.40%