89% subway

Code Review | Subway - Private Site Option

WordPress plugin Subway - Private Site Option scored89%from 54 tests.

About plugin

  • Plugin page: subway
  • Plugin version: 2.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.7
  • WordPress version: 6.3.1
  • First release: Feb 23, 2017
  • Latest release: Jan 10, 2021
  • Number of updates: 26
  • Update frequency: every 54.5 days
  • Top authors: dunhakdis (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /47,039 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.18MB] [CPU: ▼6.13ms] Passed 4 tests

Server-side resources used by Subway - Private Site Option
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1643.03 ▼0.27
Dashboard /wp-admin3.49 ▲0.1947.84 ▼2.77
Posts /wp-admin/edit.php3.61 ▲0.2549.20 ▼1.23
Add New Post /wp-admin/post-new.php6.08 ▲0.1988.03 ▼20.23
Media Library /wp-admin/upload.php3.42 ▲0.1939.08 ▲7.74
Subway /wp-admin/options-general.php?page=subway3.3937.70

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

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

Browser metrics Passed 4 tests

Subway - Private Site Option: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6014.48 ▼0.101.76 ▲0.1544.42 ▲4.64
Dashboard /wp-admin2,210 ▲225.80 ▼0.1098.10 ▼3.1340.00 ▼3.82
Posts /wp-admin/edit.php2,093 ▲42.01 ▲0.0139.17 ▼2.2834.75 ▼2.15
Add New Post /wp-admin/post-new.php6,283 ▲4,75019.31 ▼3.76892.74 ▲264.4954.11 ▼1.34
Media Library /wp-admin/upload.php1,392 ▲14.20 ▼0.0394.02 ▼5.1342.05 ▼0.32
Subway /wp-admin/options-general.php?page=subway9712.1129.4531.57

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests Passed 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)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed: The official readme.txt might help

subway/subway.php 92% from 13 tests

"Subway - Private Site Option" version 2.1.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 299 characters long)

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
Everything looks great! No dangerous files found in this plugin1,800 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP174297191,033
PO File3151151547
JavaScript26028126
CSS24252
Markdown117034
YAML1108

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity11.00
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes9100.00%
Methods40
▷ Static methods1640.00%
▷ Public methods3895.00%
▷ Protected methods12.50%
▷ Private methods12.50%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants375.00%
▷ Class constants125.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin