84% wp-show-category-id

Code Review | WP SHOW CATEGORY ID

WordPress plugin WP SHOW CATEGORY ID scored84%from 54 tests.

About plugin

  • Plugin page: wp-show-category-id
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.2
  • WordPress version: 6.3.1
  • First release: Aug 28, 2019
  • Latest release: Apr 16, 2023
  • Number of updates: 5
  • Update frequency: every 265.4 days
  • Top authors: mymizan (80%)wptasker (40%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /872 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.38ms] Passed 4 tests

This is a short check of server-side resources used by WP SHOW CATEGORY ID
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.68 ▼5.41
Dashboard /wp-admin3.31 ▲0.0050.30 ▼0.35
Posts /wp-admin/edit.php3.36 ▲0.0049.96 ▼1.87
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.91 ▼0.60
Media Library /wp-admin/upload.php3.23 ▲0.0033.23 ▼1.63

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WP SHOW CATEGORY ID
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.21 ▼1.344.81 ▲2.9742.48 ▼3.39
Dashboard /wp-admin2,206 ▲184.85 ▼0.97111.39 ▼7.1343.47 ▼2.74
Posts /wp-admin/edit.php2,092 ▲32.04 ▼0.0041.37 ▲0.7734.66 ▼0.62
Add New Post /wp-admin/post-new.php1,514 ▼1917.54 ▼5.75672.27 ▼47.1363.63 ▲9.07
Media Library /wp-admin/upload.php1,385 ▼34.23 ▲0.0596.72 ▼3.5944.10 ▲1.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix 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_filter() in wp-content/plugins/wp-show-category-id/wp-show-category-id.php:23

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

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
9 plugin tags: category ids, show category id, category, category id, woocommerce category ids...

wp-show-category-id/wp-show-category-id.php Passed 13 tests

The main PHP file in "WP SHOW CATEGORY ID" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
90 characters long description:
A simple plugin to show category IDs for post categories and WooCommerce product caegories

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin42 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1181339
Markdown1103

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
2 PNG files occupy 0.09MB with 0.06MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png34.48KB10.28KB▼ 70.18%
assets/screenshot-2.png60.30KB18.01KB▼ 70.13%