74% apoyl-ip

Code Review | [凹凸曼]显示IP归属地

WordPress plugin [凹凸曼]显示IP归属地 scored74%from 54 tests.

About plugin

  • Plugin page: apoyl-ip
  • Plugin version: 1.4.0
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-6.4
  • WordPress version: 6.3.1
  • First release: Nov 1, 2022
  • Latest release: Nov 23, 2023
  • Number of updates: 7
  • Update frequency: every 55.3 days
  • Top authors: apoyl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /398 total downloads

Benchmarks

Plugin footprint 65% 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.05MB] [CPU: ▲0.39ms] Passed 4 tests

A check of server-side resources used by [凹凸曼]显示IP归属地
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0544.91 ▲1.18
Dashboard /wp-admin3.36 ▲0.0552.43 ▲3.28
Posts /wp-admin/edit.php3.47 ▲0.1150.55 ▲3.88
Add New Post /wp-admin/post-new.php5.95 ▲0.0591.55 ▼3.29
Media Library /wp-admin/upload.php3.28 ▲0.0536.86 ▲0.37
settings /wp-admin/options-general.php?page=apoyl-ip-settings3.2633.48

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: 1 new table, 8 new options
New tables
wp_apoyl_ip
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
apoyl_ip_db_version
widget_theysaidso_widget
apoyl-ip-settings
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by [凹凸曼]显示IP归属地
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7214.27 ▼0.071.76 ▼0.0138.84 ▼5.82
Dashboard /wp-admin2,202 ▲245.58 ▼0.0391.87 ▼23.8140.10 ▼1.69
Posts /wp-admin/edit.php2,107 ▲102.01 ▲0.0536.65 ▼3.0330.72 ▼4.77
Add New Post /wp-admin/post-new.php1,529 ▼623.33 ▼1.68704.59 ▲68.6452.84 ▼35.50
Media Library /wp-admin/upload.php1,404 ▲44.23 ▲0.0495.13 ▼0.4540.81 ▼4.27
settings /wp-admin/options-general.php?page=apoyl-ip-settings9221.9922.2928.26

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_apoyl_ip
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • widget_recent-posts
    • apoyl_ip_db_version
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

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
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
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_ID() in wp-content/plugins/apoyl-ip/public/partials/public-display.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/apoyl-ip/admin/partials/setting.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/apoyl-ip/admin/partials/nav.php:11

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

readme.txt Passed 16 tests

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

apoyl-ip/apoyl-ip.php Passed 13 tests

The entry point to "[凹凸曼]显示IP归属地" version 1.4.0 is a PHP file that has certain tags in its header comment area
110 characters long description:
实现发布文章记录IP地址,用户发布文章显示IP归属地,更加方便了解用户来自哪里.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin396 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP14105150393
JavaScript1203

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity2.38
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.37
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods30
▷ Static methods413.33%
▷ Public methods2583.33%
▷ Protected methods00.00%
▷ Private methods516.67%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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 are no PNG files in this plugin