84% icpbeian

Code Review | ICPBEIAN

WordPress plugin ICPBEIAN scored84%from 54 tests.

About plugin

  • Plugin page: icpbeian
  • Plugin version: 1.00.0
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.9
  • WordPress version: 6.3.1
  • First release: Apr 14, 2022
  • Latest release: Apr 14, 2022
  • Number of updates: 10
  • Update frequency: every 1.4 days
  • Top authors: amazingzhang (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,446 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by ICPBEIAN
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.38 ▲1.56
Dashboard /wp-admin3.33 ▼0.0244.39 ▼19.55
Posts /wp-admin/edit.php3.38 ▲0.0247.76 ▲2.60
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.90 ▼10.59
Media Library /wp-admin/upload.php3.25 ▲0.0234.46 ▼4.15

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

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

Browser metrics Passed 4 tests

Checking browser requirements for ICPBEIAN
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.30 ▼1.081.74 ▼0.1444.14 ▲2.11
Dashboard /wp-admin2,203 ▲155.84 ▼0.0398.64 ▼22.5338.17 ▼5.57
Posts /wp-admin/edit.php2,092 ▲32.00 ▼0.1339.19 ▲1.1234.05 ▼3.17
Add New Post /wp-admin/post-new.php1,533 ▲1923.11 ▲5.63632.50 ▼47.5349.32 ▼6.95
Media Library /wp-admin/upload.php1,388 ▲34.28 ▲0.0893.07 ▼22.3145.22 ▼3.64

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/icpbeian/icpbeian.php:83

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

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: icp, icpbeian

icpbeian/icpbeian.php Passed 13 tests

The entry point to "ICPBEIAN" version 1.00.0 is a PHP file that has certain tags in its header comment area
19 characters long description:
China WebSite Beian

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin76 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1121952
PO File14424

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.43
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods114.29%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.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 were not PNG files found in your plugin