83% railway-pnr-status

Code Review | Railway PNR Status

WordPress plugin Railway PNR Status scored83%from 54 tests.

About plugin

  • Plugin page: railway-pnr-status
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 16, 2015
  • Latest release: Jan 16, 2015
  • Number of updates: 8
  • Update frequency: N/A
  • Top authors: krohitk1 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /3,762 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.01MB] [CPU: ▼5.39ms] Passed 4 tests

Analyzing server-side resources used by Railway PNR Status
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.03 ▼4.36
Dashboard /wp-admin3.32 ▼0.0252.02 ▼11.79
Posts /wp-admin/edit.php3.37 ▲0.0250.50 ▼1.27
Add New Post /wp-admin/post-new.php5.90 ▲0.0298.32 ▼4.14
Media Library /wp-admin/upload.php3.24 ▲0.0239.58 ▲2.52

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_wpb_widget
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Railway PNR Status
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▼0.031.71 ▼0.1443.37 ▼0.69
Dashboard /wp-admin2,198 ▲245.62 ▲0.1088.22 ▼5.3438.20 ▼0.78
Posts /wp-admin/edit.php2,100 ▼31.96 ▼0.0738.94 ▼4.2736.39 ▲3.07
Add New Post /wp-admin/post-new.php1,526 ▼222.96 ▼0.28684.30 ▲59.4367.61 ▲8.09
Media Library /wp-admin/upload.php1,400 ▼04.11 ▼0.10110.47 ▲1.3548.42 ▼1.09

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 did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_wpb_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/railway-pnr-status/pnr.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Requires at least: Version format is invalid
  • Contributors: Contributors not specified
You can take inspiration from this readme.txt

railway-pnr-status/pnr.php 92% from 13 tests

This is the main PHP file of "Railway PNR Status" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("railway-pnr-status.php" instead of "pnr.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected54 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1122154

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
No PNG images were found in this plugin