78% wpx-server-light

Code Review | WPX Server Light

WordPress plugin WPX Server Light scored78%from 54 tests.

About plugin

  • Plugin page: wpx-server-light
  • Plugin version: 2.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.8
  • WordPress version: 6.3.1
  • First release: Dec 27, 2014
  • Latest release: Sep 7, 2021
  • Number of updates: 37
  • Update frequency: every 66.2 days
  • Top authors: gfazioli (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,427 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.31MB] [CPU: ▼4.90ms] Passed 4 tests

This is a short check of server-side resources used by WPX Server Light
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2352.59 ▲11.67
Dashboard /wp-admin3.71 ▲0.3652.36 ▼10.98
Posts /wp-admin/edit.php3.76 ▲0.4047.25 ▼3.17
Add New Post /wp-admin/post-new.php6.22 ▲0.3384.98 ▼11.39
Media Library /wp-admin/upload.php3.57 ▲0.3340.54 ▲5.93

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 122 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
wpx_server_light_slug
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WPX Server Light
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7014.45 ▼0.101.68 ▼0.0242.21 ▲0.92
Dashboard /wp-admin2,225 ▲345.88 ▲0.99109.69 ▲7.0242.25 ▼0.07
Posts /wp-admin/edit.php2,105 ▲162.04 ▲0.0132.91 ▼4.1435.14 ▲2.42
Add New Post /wp-admin/post-new.php1,550 ▲2223.34 ▲4.86647.89 ▲35.7953.98 ▼0.19
Media Library /wp-admin/upload.php1,404 ▲134.24 ▲0.03104.29 ▲9.2146.26 ▲0.68

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • wpx_server_light_slug
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wpx-server-light/resources/views/dashboard/ram.php
    • > /wp-content/plugins/wpx-server-light/resources/views/dashboard/cpu.php
  • 39× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wpx-server-light/resources/views/dashboard/software.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WPXServerLight\\WPBones\\Foundation\\Plugin' not found in wp-content/plugins/wpx-server-light/bootstrap/plugin.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WPXServerLight\\WPBones\\Html\\HtmlTag' not found in wp-content/plugins/wpx-server-light/vendor/wpbones/wpbones/src/Html/HtmlTagOptGroup.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WPXServerLight\\WPBones\\Html\\HtmlTag' not found in wp-content/plugins/wpx-server-light/vendor/wpbones/wpbones/src/Html/HtmlTagInput.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WPXServerLight\\Modules\\Module' not found in wp-content/plugins/wpx-server-light/plugin/Modules/Software.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WPXServerLight\\WPBones\\Routing\\Controller' not found in wp-content/plugins/wpx-server-light/plugin/Http/Controllers/Controller.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WPXServerLight\\WPBones\\Html\\HtmlTag' not found in wp-content/plugins/wpx-server-light/vendor/wpbones/wpbones/src/Html/HtmlTagDatetime.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WPXServerLight\\MorrisPHP\\Chart' not found in wp-content/plugins/wpx-server-light/vendor/wpbones/morris-php/src/Area.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WPXServerLight\\Http\\Controllers\\Controller' not found in wp-content/plugins/wpx-server-light/plugin/Http/Controllers/Dashboard/DashboardController.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WPXServerLight\\WPBones\\Html\\HtmlTag' not found in wp-content/plugins/wpx-server-light/vendor/wpbones/wpbones/src/Html/HtmlTagA.php:5

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 errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
9 plugin tags: iostat, status, process, stats, software...

wpx-server-light/index.php 77% from 13 tests

"WPX Server Light" version 2.2.0'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:
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("localization")
  • Main file name: Name the main plugin file the same as the plugin slug ("wpx-server-light.php" instead of "index.php")
  • Domain Path: The domain path should be prefixed with a forward slash character ("/localization")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected5,975 lines of code in 102 files:
LanguageFilesBlank linesComment linesLines of code
PHP831,5792,9275,446
Markdown7870218
JSON300187
PO File2326244
CSS501940
JavaScript2131240

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity8.72
▷ Minimum class complexity1.00
▷ Maximum class complexity82.00
Average method complexity2.52
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces20
Interfaces2
Traits0
Classes55
▷ Abstract classes1120.00%
▷ Concrete classes4480.00%
▷ Final classes00.00%
Methods275
▷ Static methods5118.55%
▷ Public methods22381.09%
▷ Protected methods4114.91%
▷ Private methods114.00%
Functions18
▷ Named functions1266.67%
▷ Anonymous functions633.33%
Constants6
▷ Global constants233.33%
▷ Class constants466.67%
▷ Public constants4100.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
3 PNG files occupy 0.26MB with 0.17MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png23.14KB8.41KB▼ 63.67%
assets/screenshot-1.png232.06KB75.92KB▼ 67.28%
assets/icon-128x128.png11.39KB4.64KB▼ 59.27%