84% wpicp-license

Code Review | WPICP License

WordPress plugin WPICP License scored84%from 54 tests.

About plugin

  • Plugin page: wpicp-license
  • Plugin version: 1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.2
  • WordPress version: 6.3.1
  • First release: Mar 2, 2023
  • Latest release: Mar 30, 2023
  • Number of updates: 10
  • Update frequency: every 2.8 days
  • Top authors: wpfanyi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /914 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.05ms] Passed 4 tests

Analyzing server-side resources used by WPICP License
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.70 ▼0.50
Dashboard /wp-admin3.37 ▲0.0249.89 ▼20.10
Posts /wp-admin/edit.php3.42 ▲0.0649.89 ▼2.39
Add New Post /wp-admin/post-new.php5.95 ▲0.0696.72 ▼5.21
Media Library /wp-admin/upload.php3.29 ▲0.0639.66 ▲1.81
ICP License /wp-admin/options-general.php?page=wpicp_license_settings3.2634.14

Server storage [IO: ▲0.06MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please fix the following
  • The plugin illegally modified 1 file (4.00KB) outside of "wp-content/plugins/wpicp-license/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WPICP License
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲8313.21 ▼1.151.70 ▼0.0340.55 ▼2.43
Dashboard /wp-admin2,228 ▲345.05 ▲0.1998.40 ▼16.3043.23 ▲0.78
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0140.01 ▼1.8338.62 ▲1.72
Add New Post /wp-admin/post-new.php1,557 ▲318.44 ▼0.04613.19 ▼6.1356.60 ▼9.09
Media Library /wp-admin/upload.php1,404 ▲14.25 ▲0.02100.47 ▼8.8940.03 ▼5.90
ICP License /wp-admin/options-general.php?page=wpicp_license_settings9992.0224.0929.14

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Please 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 plugin_dir_path() in wp-content/plugins/wpicp-license/wpicp-license.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: icp, icp license, icp beian

wpicp-license/wpicp-license.php Passed 13 tests

"WPICP License" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
65 characters long description:
Must-have for WordPress sites in China, showing your ICP license.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin505 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PO File2105107281
PHP24145224

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.09
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%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/gongan.png3.74KB1.17KB▼ 68.62%