83% wrapping-shortcode

Code Review | Wrapping ShortCode

WordPress plugin Wrapping ShortCode scored 83% from 54 tests.

About plugin

  • Plugin page: wrapping-shortcode
  • Plugin version: 0.1.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.1
  • WordPress version: 6.3.1
  • First release: Nov 8, 2022
  • Latest release: Nov 8, 2022
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: Asumaru (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 817 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼3.68ms] Passed 4 tests

Analyzing server-side resources used by Wrapping ShortCode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1943.89 ▲2.84
Dashboard /wp-admin3.48 ▲0.1850.48 ▼2.93
Posts /wp-admin/edit.php3.59 ▲0.2447.10 ▼1.31
Add New Post /wp-admin/post-new.php6.08 ▲0.1986.64 ▼8.28
Media Library /wp-admin/upload.php3.41 ▲0.1836.80 ▼2.20

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Wrapping ShortCode: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,027 ▲28121.65 ▲7.2845.56 ▲43.7242.16 ▼1.32
Dashboard /wp-admin2,288 ▲1149.64 ▲4.76137.70 ▲22.3742.26 ▼8.58
Posts /wp-admin/edit.php2,164 ▲789.24 ▲7.2268.46 ▲32.0831.35 ▼2.42
Add New Post /wp-admin/post-new.php6,437 ▲4,90320.61 ▼2.61897.43 ▲204.5537.50 ▼17.01
Media Library /wp-admin/upload.php1,482 ▲9410.99 ▲6.81126.86 ▲20.3241.51 ▼9.12

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

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
Even though no errors were found, 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
Almost there! Just fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Asm_Wrapping_ShortCode\\Base' not found in wp-content/plugins/wrapping-shortcode/classes/class-shortcode-metaloop.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Asm_Wrapping_ShortCode\\Base' not found in wp-content/plugins/wrapping-shortcode/classes/class-template.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Asm_Wrapping_ShortCode\\Base' not found in wp-content/plugins/wrapping-shortcode/classes/class-shortcode-commentout.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Asm_Wrapping_ShortCode\\Base' not found in wp-content/plugins/wrapping-shortcode/classes/class-enqueue.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: group, shortcode, asumaru, block, commentout...

wrapping-shortcode/asm-wrapping-shortcode-block.php 69% from 13 tests

Analyzing the main PHP file in "Wrapping ShortCode" version 0.1.0
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wrapping-shortcode.php" instead of "asm-wrapping-shortcode-block.php")
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("(default) // Changed from 'languages'")
  • Domain Path: The domain path should be prefixed with a forward slash character ("/(default) // Changed from 'languages'")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected28,771 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
JSON40027,721
PHP869557827
JavaScript526142175
Sass25046
CSS2002

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity15.33
▷ Minimum class complexity1.00
▷ Maximum class complexity39.00
Average method complexity3.15
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods40
▷ Static methods00.00%
▷ Public methods3382.50%
▷ Protected methods00.00%
▷ Private methods717.50%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
No PNG files were detected