78% teleporter

Code Review | Teleporter

WordPress plugin Teleporter scored 78% from 54 tests.

About plugin

  • Plugin page: teleporter
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-5.8.1
  • WordPress version: 5.8.1
  • First release: Jul 20, 2021
  • Latest release: Oct 28, 2021
  • Number of updates: 7
  • Update frequency: every 14.3 days
  • Top authors: majick (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 232 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
Install script ran successfully

Server metrics [RAM: ▲0.65MB] [CPU: ▼141.15ms] Passed 4 tests

Analyzing server-side resources used by Teleporter
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.11 ▲0.2833.11 ▼1.87
Dashboard /wp-admin3.89 ▲0.8461.73 ▲16.04
Posts /wp-admin/edit.php3.92 ▲0.8250.34 ▲6.88
Add New Post /wp-admin/post-new.php6.17 ▲0.7498.10 ▼565.35
Media Library /wp-admin/upload.php3.75 ▲0.7539.90 ▼4.24
WordQuest /wp-admin/admin.php?page=wordquest3.7547.27
Teleporter /wp-admin/admin.php?page=teleporter3.7336.50

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 2 new options
New WordPress options
wq_sidebar_options
tp_sidebar_options

Browser metrics Passed 4 tests

A check of browser resources used by Teleporter
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,026 ▲43014.26 ▼1.4328.53 ▲15.3549.69 ▼0.32
Dashboard /wp-admin3,251 ▲3206.25 ▲0.16145.60 ▲3.87147.99 ▲35.28
Posts /wp-admin/edit.php2,812 ▲732.73 ▲0.0179.31 ▲13.4473.93 ▼18.80
Add New Post /wp-admin/post-new.php1,646 ▲14621.49 ▲2.93291.99 ▼118.55106.70 ▼2.13
Media Library /wp-admin/upload.php1,801 ▼95.07 ▲0.01142.36 ▼15.23136.25 ▲23.05
WordQuest /wp-admin/admin.php?page=wordquest2,1172.7457.73166.10
Teleporter /wp-admin/admin.php?page=teleporter1,6493.0887.69142.93

Uninstaller [IO: ▲0.00MB] [DB: ▲0.11MB] 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
  • The uninstall procedure has failed, leaving 2 options in the database
    • tp_sidebar_options
    • wq_sidebar_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function has_action() in wp-content/plugins/teleporter/wordquest.php:91
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/teleporter/loader.php:2867

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=wordquest
    • > Network (severe)
    wp-content/plugins/teleporter/images/rv-report.jpg - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=wordquest
    • > Network (severe)
    wp-content/plugins/teleporter/images/pp-donate.jpg - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=wordquest
    • > Network (severe)
    https://pluginreview.net/recommends/?s=yes&a=majick&c=wordquest&t=sidebar - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: ajax page load, transition, page transition, single page application

teleporter/loader.php 92% from 13 tests

The entry point to "Teleporter" version 1.2.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("teleporter.php" instead of "loader.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin5,470 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP39661,8134,288
JavaScript71433801,182

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
The following items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 118)
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity457.00
▷ Minimum class complexity457.00
▷ Maximum class complexity457.00
Average method complexity14.82
▷ Minimum method complexity1.00
▷ Maximum method complexity118.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods33
▷ Static methods00.00%
▷ Public methods33100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions85
▷ Named functions5868.24%
▷ Anonymous functions2731.76%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/wordquest-icon.png1.24KB1.23KB0.40%
images/teleporter.png11.33KB4.27KB▼ 62.34%
images/wordquest.png7.71KB3.13KB▼ 59.40%
images/icon.png1.11KB1.23KB0.00%