83% wp-ipua

Code Review | IPUA - IP 属地和 User-Agent 插件

WordPress plugin IPUA - IP 属地和 User-Agent 插件 scored83%from 54 tests.

About plugin

  • Plugin page: wp-ipua
  • Plugin version: 2.0.1
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3
  • WordPress version: 6.3.1
  • First release: Oct 1, 2022
  • Latest release: Aug 25, 2023
  • Number of updates: 9
  • Update frequency: every 36.6 days
  • Top authors: haozi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,400 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.25MB] [CPU: ▼2.95ms] Passed 4 tests

This is a short check of server-side resources used by IPUA - IP 属地和 User-Agent 插件
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2244.92 ▼1.08
Dashboard /wp-admin3.64 ▲0.2957.15 ▼4.58
Posts /wp-admin/edit.php3.70 ▲0.3354.72 ▲6.80
Add New Post /wp-admin/post-new.php6.14 ▲0.2590.30 ▼8.43
Media Library /wp-admin/upload.php3.48 ▲0.2540.83 ▲2.30
WP-IPUA /wp-admin/options-general.php?page=wp-ipua3.4841.47

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for IPUA - IP 属地和 User-Agent 插件
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,947 ▲20114.84 ▲0.481.89 ▲0.2544.15 ▲1.15
Dashboard /wp-admin2,356 ▲1796.35 ▲0.69126.49 ▲37.8543.72 ▲4.40
Posts /wp-admin/edit.php2,281 ▲1813.56 ▲1.5347.56 ▲6.7732.69 ▼5.72
Add New Post /wp-admin/post-new.php1,540 ▲1223.65 ▲0.56618.13 ▼60.0634.24 ▼17.41
Media Library /wp-admin/upload.php1,421 ▲214.35 ▲0.1685.14 ▼20.6043.57 ▼4.81
WP-IPUA /wp-admin/options-general.php?page=wp-ipua1,2493.5446.5690.21

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function HaoZiTeam\\IPUA\\plugin_dir_path() in wp-content/plugins/wp-ipua/wp-ipua.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Contributors: No tags were detected
  • Contributors: Plugin contributors field is missing
Please take inspiration from this readme.txt

wp-ipua/wp-ipua.php 85% from 13 tests

The main file in "IPUA - IP 属地和 User-Agent 插件" v. 2.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Requires PHP: Required version does not match the one declared in readme.txt ("5.6" instead of "5.6.0")

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
Success! There were no dangerous files found in this plugin2,021 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP204066921,904
JSON300109
Markdown1608

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity26.20
▷ Minimum class complexity1.00
▷ Maximum class complexity74.00
Average method complexity3.04
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods92
▷ Static methods2122.83%
▷ Public methods8390.22%
▷ Protected methods44.35%
▷ Private methods55.43%
Functions15
▷ Named functions640.00%
▷ Anonymous functions960.00%
Constants5
▷ Global constants120.00%
▷ Class constants480.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin