84% ip-address-shortcode

Code Review | IP Address Shortcode

WordPress plugin IP Address Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: ip-address-shortcode
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.9
  • WordPress version: 6.3.1
  • First release: Feb 1, 2022
  • Latest release: Feb 1, 2022
  • Number of updates: 7
  • Update frequency: N/A
  • Top authors: wcdev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /547 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
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by IP Address Shortcode
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0139.30 ▲1.33
Dashboard /wp-admin3.32 ▲0.0146.02 ▼3.53
Posts /wp-admin/edit.php3.37 ▲0.0154.05 ▲4.76
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.97 ▼11.82
Media Library /wp-admin/upload.php3.24 ▲0.0137.00 ▲2.45

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by IP Address Shortcode
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.59 ▼1.181.69 ▼0.1438.08 ▼4.15
Dashboard /wp-admin2,209 ▲244.86 ▼0.0198.55 ▼19.8537.96 ▼8.90
Posts /wp-admin/edit.php2,092 ▼02.04 ▲0.0339.77 ▲0.0337.62 ▲2.06
Add New Post /wp-admin/post-new.php1,535 ▼723.52 ▲0.42604.51 ▼84.5851.92 ▼4.77
Media Library /wp-admin/upload.php1,391 ▲34.24 ▲0.0794.00 ▼6.6043.12 ▼2.16

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • 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 | 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
Please take a closer look at the following
  • 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/ip-address-shortcode/ip-address-shortcode.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: show ip address, ip address

ip-address-shortcode/ip-address-shortcode.php 92% from 13 tests

The main PHP file in "IP Address Shortcode" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 157 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected21 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP131121

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code1.20
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin