74% oneday-transport-links

Code Review | Hong Kong Transport Links

WordPress plugin Hong Kong Transport Links scored 74% from 54 tests.

About plugin

  • Plugin page: oneday-transport-...
  • Plugin version: 1.0
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.0.3
  • WordPress version: 6.3.1
  • First release: Feb 13, 2019
  • Latest release: Mar 4, 2019
  • Number of updates: 13
  • Update frequency: every 1.5 days
  • Top authors: aljonhodfords (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 430 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
Installer ran successfully

Server metrics [RAM: ▼1.92MB] [CPU: ▼54.00ms] Passed 4 tests

A check of server-side resources used by Hong Kong Transport Links
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.394.28 ▼42.09
Dashboard /wp-admin2.09 ▼1.215.93 ▼42.45
Posts /wp-admin/edit.php2.10 ▼1.267.41 ▼36.41
Add New Post /wp-admin/post-new.php2.09 ▼3.807.59 ▼95.04
Media Library /wp-admin/upload.php2.09 ▼1.145.78 ▼29.83

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Hong Kong Transport Links
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲7514.43 ▲0.061.57 ▼0.7740.09 ▼6.78
Dashboard /wp-admin2,207 ▲165.83 ▲0.75103.45 ▲5.5740.61 ▼5.00
Posts /wp-admin/edit.php2,096 ▲72.00 ▼0.0638.66 ▲3.0636.97 ▼0.93
Add New Post /wp-admin/post-new.php1,525 ▼823.26 ▲0.29657.27 ▲37.2065.60 ▲7.19
Media Library /wp-admin/upload.php1,392 ▲44.18 ▼0.0793.79 ▼12.0943.68 ▲0.61

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the odt_main_js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

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

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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Undefined index: odt_action in wp-content/plugins/oneday-transport-links/odt-actions.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
8 plugin tags: transport plugin, hong kong transport links, near transportation, hong kong transport, oneday...

oneday-transport-links/index.php 85% from 13 tests

The primary PHP file in "Hong Kong Transport Links" version 1.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("oneday-transport-links.php" instead of "index.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 275 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin404 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP46719218
JavaScript2337183
CSS1003

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity4.40
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods5100.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants13100.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 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/menu_icon_20x20.png1.93KB1.20KB▼ 37.85%
assets/images/menu_icon.png3.71KB1.63KB▼ 55.89%