84% wp-ngrok

Code Review | WP-ngrok

WordPress plugin WP-ngrok scored84%from 54 tests.

About plugin

  • Plugin page: wp-ngrok
  • Plugin version: 1.1.2
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Dec 3, 2020
  • Latest release: Dec 4, 2022
  • Number of updates: 13
  • Update frequency: every 56.2 days
  • Top authors: themeid (84.62%)hadie danker (23.08%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /4,395 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.30ms] Passed 4 tests

Analyzing server-side resources used by WP-ngrok
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.51 ▼0.16
Dashboard /wp-admin3.31 ▲0.0060.49 ▲12.61
Posts /wp-admin/edit.php3.36 ▲0.0045.53 ▼1.93
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.94 ▼11.75
Media Library /wp-admin/upload.php3.23 ▲0.0033.74 ▲0.64

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP-ngrok
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.34 ▼1.041.81 ▲0.1538.80 ▼3.11
Dashboard /wp-admin2,206 ▲155.77 ▼0.1197.14 ▼2.7536.52 ▼1.81
Posts /wp-admin/edit.php2,089 ▲142.04 ▲0.0239.60 ▲4.4735.47 ▲3.01
Add New Post /wp-admin/post-new.php1,533 ▼323.11 ▼0.20645.50 ▲42.3354.67 ▼0.84
Media Library /wp-admin/upload.php1,388 ▼34.23 ▼0.1496.39 ▼8.1241.32 ▼4.39

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-ngrok/wp-ngrok.php:21

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
9 plugin tags: localhost, developer, development, ngrok, callback...

wp-ngrok/wp-ngrok.php Passed 13 tests

The main file in "WP-ngrok" v. 1.1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
51 characters long description:
Expose your local WordPress to the world with Ngrok

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin191 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22954129
Markdown132062

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods787.50%
▷ Protected methods00.00%
▷ Private methods112.50%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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 files were detected