84% php-live-wordpress

Code Review | PHP Live!

WordPress plugin PHP Live! scored84%from 54 tests.

About plugin

  • Plugin page: php-live-wordpress
  • Plugin version: 3.6
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-5.9.2
  • WordPress version: 6.3.1
  • First release: Jan 6, 2012
  • Latest release: Apr 4, 2022
  • Number of updates: 47
  • Update frequency: every 82.3 days
  • Top authors: osicodesinc (57.45%)phplivesupport (44.68%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /16,991 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼7.60ms] Passed 4 tests

A check of server-side resources used by PHP Live!
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0233.87 ▼1.02
Dashboard /wp-admin3.35 ▲0.0444.15 ▼4.26
Posts /wp-admin/edit.php3.46 ▲0.1044.42 ▼6.80
Add New Post /wp-admin/post-new.php5.93 ▲0.0481.13 ▼18.32
Media Library /wp-admin/upload.php3.27 ▲0.0437.42 ▲4.90

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_phplive_widget

Browser metrics Passed 4 tests

Checking browser requirements for PHP Live!
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4314.53 ▲0.181.52 ▼0.0039.01 ▼2.54
Dashboard /wp-admin2,207 ▲325.56 ▼0.1786.80 ▼8.6174.18 ▲30.76
Posts /wp-admin/edit.php2,118 ▲181.97 ▼0.0640.19 ▼0.2135.76 ▼1.88
Add New Post /wp-admin/post-new.php1,539 ▲1323.65 ▲0.61680.98 ▲1.1362.44 ▲5.87
Media Library /wp-admin/upload.php1,418 ▲274.13 ▼0.26100.50 ▼2.1876.64 ▲29.77

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • widget_phplive_widget
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Almost there! Just fix the following items
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/php-live-wordpress/libs/phplive.widget.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/php-live-wordpress/libs/phplive.widget.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/php-live-wordpress/phplive.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/php-live-wordpress/libs/phplive.widget.php:5

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 93% from 29 tests

readme.txt 94% 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
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (Operator Console "default" theme), #2 (Operator Console "home" theme), #3 (Operator Console traffic monitor)
The official readme.txt might help

php-live-wordpress/phplive.php 92% from 13 tests

The primary PHP file in "PHP Live!" version 3.6 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("php-live-wordpress.php" instead of "phplive.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin239 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP42720160
JavaScript214170
CSS1109

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity8.00
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods15
▷ Static methods213.33%
▷ Public methods1386.67%
▷ Protected methods213.33%
▷ 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

PNG files should be compressed to save space and minimize bandwidth usage
4 compressed PNG files occupy 0.00MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
libs/pics/page_white_code.png0.59KB0.59KB0.50%
libs/pics/wordpress.png0.84KB1.03KB0.00%
libs/pics/settings.png0.50KB0.37KB▼ 25.05%
libs/pics/phplive.png0.55KB0.46KB▼ 17.28%