84% get-page-url

Code Review | Get Page URL

WordPress plugin Get Page URL scored84%from 54 tests.

About plugin

  • Plugin page: get-page-url
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Jun 11, 2022
  • Latest release: Jun 14, 2022
  • Number of updates: 10
  • Update frequency: every 0.3 days
  • Top authors: ehabahmad (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /322 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.87ms] Passed 4 tests

This is a short check of server-side resources used by Get Page URL
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.95 ▼8.95
Dashboard /wp-admin3.31 ▲0.0152.51 ▼1.84
Posts /wp-admin/edit.php3.36 ▲0.0147.62 ▼0.19
Add New Post /wp-admin/post-new.php5.89 ▲0.0194.71 ▲8.43
Media Library /wp-admin/upload.php3.23 ▲0.0033.25 ▼0.49

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Get Page URL
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.56 ▼0.824.55 ▲2.7145.75 ▲2.16
Dashboard /wp-admin2,209 ▲214.88 ▼1.1498.82 ▼18.9239.83 ▼7.71
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0039.08 ▲4.0334.11 ▼0.10
Add New Post /wp-admin/post-new.php1,542 ▲918.22 ▼4.89611.18 ▼31.6458.74 ▲9.39
Media Library /wp-admin/upload.php1,391 ▲34.18 ▼0.0494.85 ▼6.0340.08 ▼2.23

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/get-page-url/get_current_url.php:39

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 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
There were no plugin tags found

get-page-url/get_current_url.php 92% from 13 tests

The primary PHP file in "Get Page URL" version 1.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("get-page-url.php" instead of "get_current_url.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected20 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP113820

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin