10% swtor-server-status

Code Review | SWTOR Server Status

WordPress plugin SWTOR Server Status scored 10% from 54 tests.

About plugin

  • Plugin page: swtor-server-status
  • Plugin version: 0.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9.2-3.3.1
  • WordPress version: 6.3.1
  • First release: Dec 16, 2011
  • Latest release: Mar 7, 2012
  • Number of updates: 14
  • Update frequency: every 5.9 days
  • Top authors: jakob42 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 3,076 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/swtor-server-status/swtor-server-status-widget.php+20
    Methods with the same name as their class will not be constructors in a future version of PHP; SWTORServerStatusWidget has a deprecated constructor

Server metrics [RAM: ▼1.51MB] [CPU: ▼52.03ms] Passed 4 tests

Analyzing server-side resources used by SWTOR Server Status
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.48 ▼0.986.03 ▼34.91
Dashboard /wp-admin2.50 ▼0.817.43 ▼43.40
Posts /wp-admin/edit.php2.50 ▼0.866.41 ▼40.65
Add New Post /wp-admin/post-new.php2.50 ▼3.399.47 ▼89.16
Media Library /wp-admin/upload.php2.50 ▼0.737.56 ▼27.21
SWTOR Server Status /wp-admin/options-general.php?page=swtor_server_status2.506.46

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-comments
widget_swtor_server_status_guild
swtor_server_status_css
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
swtor_server_status_morecss
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for SWTOR Server Status
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4913.25 ▼1.141.62 ▼0.4238.72 ▼3.94
Dashboard /wp-admin2,198 ▲105.83 ▲0.9398.19 ▼5.4838.46 ▼7.22
Posts /wp-admin/edit.php2,090 ▲11.98 ▼0.0336.23 ▼0.8834.59 ▲0.22
Add New Post /wp-admin/post-new.php1,672 ▲13022.36 ▲4.07599.71 ▼20.6874.04 ▼20.43
Media Library /wp-admin/upload.php1,392 ▲44.26 ▲0.08104.20 ▼0.7543.63 ▼16.04
SWTOR Server Status /wp-admin/options-general.php?page=swtor_server_status8182.0524.7625.20

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/swtor-server-status/swtor-server-status-widget.php+20
    Methods with the same name as their class will not be constructors in a future version of PHP; SWTORServerStatusWidget has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 9 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_swtor_server_status_guild
    • swtor_server_status_morecss
    • widget_theysaidso_widget
    • swtor_server_status_css
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=swtor_server_status
    • > Deprecated in wp-content/plugins/swtor-server-status/swtor-server-status-widget.php+20
    Methods with the same name as their class will not be constructors in a future version of PHP; SWTORServerStatusWidget has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=swtor_server_status
    • > Deprecated in wp-content/plugins/swtor-server-status/swtor-server-status-widget.php+103
    Function create_function() is deprecated
    • > GET request to /wp-admin/options-general.php?page=swtor_server_status
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in SWTORServerStatusWidget is deprecated since version 4.3.0! Use __construct() instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=swtor_server_status
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=swtor_server_status
    • > User deprecated in wp-includes/functions.php+5453
    Function attribute_escape is deprecated since version 2.8.0! Use esc_attr() instead.
    • > GET request to /wp-admin/options-general.php?page=swtor_server_status
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=swtor_server_status
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× 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/swtor-server-status/swtor-server-status-widget.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/swtor-server-status/swtor-server-status-widget.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

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
Please fix the following attributes:
  • Screenshots: Please add an image for screenshot #1 (This is how the plugin looks like in my blog)
  • Contributors: The plugin contributors field is not present
The official readme.txt is a good inspiration

swtor-server-status/swtor-server-status.php 77% from 13 tests

The primary PHP file in "SWTOR Server Status" version 0.3.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("i18n/")
  • Domain Path: Prefix the domain path with a forward slash character ("/i18n/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin1,075 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP31761981,021
CSS110154

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity74.00
▷ Minimum class complexity9.00
▷ Maximum class complexity119.00
Average method complexity3.88
▷ Minimum method complexity1.00
▷ Maximum method complexity56.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods76
▷ Static methods00.00%
▷ Public methods6180.26%
▷ Protected methods1519.74%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants17
▷ Global constants17100.00%
▷ Class constants00.00%
▷ Public constants00.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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
server_status_offline.png0.62KB0.62KB0.00%
server_status_online.png0.65KB0.62KB▼ 4.63%