88% wp-custom-tags

Code Review | WP Custom Tags

WordPress plugin WP Custom Tags scored 88% from 54 tests.

About plugin

  • Plugin page: wp-custom-tags
  • Plugin version: 0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8
  • WordPress version: 5.9.2
  • First release: Oct 8, 2018
  • Latest release: Oct 8, 2018
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: appsdevpk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 327 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.51MB] [CPU: ▼288.19ms] Passed 4 tests

An overview of server-side resources used by WP Custom Tags
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.86 ▲0.3558.19 ▲1.13
Dashboard /wp-admin4.03 ▲0.6241.29 ▲6.41
Posts /wp-admin/edit.php4.22 ▲0.5846.08 ▲3.02
Add New Post /wp-admin/post-new.php7.48 ▲0.51102.81 ▼1,159.96
Media Library /wp-admin/upload.php3.91 ▲0.6230.93 ▲3.07
WPCTags /wp-admin/edit.php?post_type=wpctag3.9531.85
Add New /wp-admin/post-new.php?post_type=wpctag4.4244.51

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 367 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Custom Tags
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,845 ▲9116.45 ▲0.4910.51 ▲4.372.55 ▲0.08
Dashboard /wp-admin2,926 ▲686.22 ▲0.03128.60 ▼9.44162.46 ▼5.62
Posts /wp-admin/edit.php2,736 ▲453.26 ▲0.0264.90 ▼0.14145.30 ▼5.24
Add New Post /wp-admin/post-new.php1,704 ▲4319.81 ▲4.01385.53 ▼4.48161.29 ▲3.01
Media Library /wp-admin/upload.php1,746 ▲515.59 ▲0.07142.01 ▲5.42190.62 ▲0.18
WPCTags /wp-admin/edit.php?post_type=wpctag1,4223.1960.85114.74
Add New /wp-admin/post-new.php?post_type=wpctag2,4146.70127.82162.18

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-custom-tags/wpcustomtags.php
  • 38× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function cmb2_dir() in wp-content/plugins/wp-custom-tags/cmb2/includes/rest-api/CMB2_REST_Controller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/wp-custom-tags/cmb2/includes/types/CMB2_Type_Textarea_Code.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Radio' not found in wp-content/plugins/wp-custom-tags/cmb2/includes/types/CMB2_Type_Taxonomy_Radio_Hierarchical.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Hookup_Base' not found in wp-content/plugins/wp-custom-tags/cmb2/includes/CMB2_hookup.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/wp-custom-tags/cmb2/includes/types/CMB2_Type_Oembed.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/wp-custom-tags/cmb2/includes/types/CMB2_Type_Select.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/wp-custom-tags/cmb2/includes/types/CMB2_Type_Multi_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/wp-custom-tags/cmb2/includes/types/CMB2_Type_Title.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Multicheck' not found in wp-content/plugins/wp-custom-tags/cmb2/includes/types/CMB2_Type_Taxonomy_Multicheck_Hierarchical.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Hookup_Base' not found in wp-content/plugins/wp-custom-tags/cmb2/includes/rest-api/CMB2_REST.php:19

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 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: web components, riotjs, tags, custom tags, components

wp-custom-tags/wpcustomtags.php 85% from 13 tests

Analyzing the main PHP file in "WP Custom Tags" version 0.1
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-custom-tags.php" instead of "wpcustomtags.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
No dangerous file extensions were detected48,739 lines of code in 222 files:
LanguageFilesBlank linesComment linesLines of code
PO File12014,31518,50232,323
PHP552,0635,9327,037
CSS121,1641,1484,644
JavaScript154496332,733
Sass16300251,378
Markdown42200624

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity18.48
▷ Minimum class complexity1.00
▷ Maximum class complexity181.00
Average method complexity3.24
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes66
▷ Abstract classes812.12%
▷ Concrete classes5887.88%
▷ Final classes00.00%
Methods518
▷ Static methods8616.60%
▷ Public methods42682.24%
▷ Protected methods8917.18%
▷ Private methods30.58%
Functions42
▷ Named functions42100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants333.33%
▷ Class constants666.67%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
14 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
cmb2/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
cmb2/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
cmb2/images/ico-delete.png0.70KB0.72KB0.00%
cmb2/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
cmb2/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%