83% mini-live-preview-url

Code Review | Mini Live Preview URL

WordPress plugin Mini Live Preview URL scored83%from 54 tests.

About plugin

  • Plugin page: mini-live-preview...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3
  • WordPress version: 6.3.1
  • First release: Mar 8, 2020
  • Latest release: Aug 27, 2023
  • Number of updates: 7
  • Update frequency: every 181.7 days
  • Top authors: sajjad67 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /805 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.12MB] [CPU: ▼2.41ms] Passed 4 tests

Server-side resources used by Mini Live Preview URL
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.0942.14 ▼0.62
Dashboard /wp-admin3.53 ▲0.1858.48 ▲3.64
Posts /wp-admin/edit.php3.58 ▲0.1855.24 ▲2.84
Add New Post /wp-admin/post-new.php6.02 ▲0.1082.71 ▼14.03
Media Library /wp-admin/upload.php3.37 ▲0.1036.84 ▲2.16

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
wpmlpu_basic_settings
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Mini Live Preview URL
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,974 ▲18814.80 ▲0.171.95 ▼0.2243.06 ▼2.44
Dashboard /wp-admin2,353 ▲1766.36 ▲0.78123.23 ▲27.8742.47 ▲1.20
Posts /wp-admin/edit.php2,284 ▲1873.51 ▲1.5249.84 ▲13.2031.78 ▼3.12
Add New Post /wp-admin/post-new.php1,541 ▲1323.69 ▲0.78648.14 ▼56.8936.65 ▼15.89
Media Library /wp-admin/upload.php1,424 ▲244.32 ▲0.1585.75 ▼18.0142.76 ▼2.50
Mini Live Preview URL /wp-admin/wp-mini-live-preview-url.php260.420.0914.42

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • can_compress_scripts
    • wpmlpu_basic_settings
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/wp-mini-live-preview-url.php
    • > Network (severe)
    wp-admin/wp-mini-live-preview-url.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
9 plugin tags: iframe, live-preview, url, url-preview, popup-url...

mini-live-preview-url/wp-mini-live-url-preview.php 77% from 13 tests

Analyzing the main PHP file in "Mini Live Preview URL" version 1.0.2
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Main file name: The principal plugin file should be the same as the plugin slug ("mini-live-preview-url.php" instead of "wp-mini-live-url-preview.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin641 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP2157233485
JavaScript2161198
CSS18058

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity36.50
▷ Minimum class complexity1.00
▷ Maximum class complexity72.00
Average method complexity2.39
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods37
▷ Static methods00.00%
▷ Public methods37100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.00%
Constants2
▷ Global constants2100.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
There were not PNG files found in your plugin