73% playstation-network-status

Code Review | PSN Status Widget

WordPress plugin PSN Status Widget scored73%from 54 tests.

About plugin

  • Plugin page: playstation-netwo...
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-6.0
  • WordPress version: 6.3.1
  • First release: Aug 11, 2009
  • Latest release: Jul 1, 2022
  • Number of updates: 23
  • Update frequency: every 204.6 days
  • Top authors: niraj.shah (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,433 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▼1.24MB] [CPU: ▼44.34ms] Passed 4 tests

Analyzing server-side resources used by PSN Status Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.74 ▼0.7215.15 ▼26.49
Dashboard /wp-admin2.77 ▼0.5315.80 ▼36.96
Posts /wp-admin/edit.php2.78 ▼0.5815.75 ▼31.61
Add New Post /wp-admin/post-new.php2.77 ▼3.1116.04 ▼82.29
Media Library /wp-admin/upload.php2.78 ▼0.4514.63 ▼23.82

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by PSN Status Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.36 ▼0.941.84 ▲0.0243.93 ▼2.11
Dashboard /wp-admin2,206 ▲184.87 ▼0.16107.39 ▼6.1839.10 ▼8.52
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0434.89 ▼1.9735.14 ▲1.02
Add New Post /wp-admin/post-new.php1,514 ▼1917.58 ▼5.34672.70 ▲11.8861.83 ▲7.98
Media Library /wp-admin/upload.php1,382 ▼04.19 ▲0.0397.47 ▼5.0140.29 ▼1.78

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5453
    Function register_sidebar_widget is deprecated since version 2.8.0! Use wp_register_sidebar_widget() instead.
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
The following issues need your attention
  • 1× 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/playstation-network-status/psn-status-widget.php:120

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 issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Donate link: Please fix this invalid URI: ""
  • Plugin Name: Please specify the plugin name on the first line ( === playstation-network-status === )
The official readme.txt is a good inspiration

playstation-network-status/psn-status-widget.php 92% from 13 tests

The primary PHP file in "PSN Status Widget" version 0.5 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("playstation-network-status.php" instead of "psn-status-widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin98 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1121098

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin