84% cb-visual-shortcode

Code Review | CB Visual Shortcode

WordPress plugin CB Visual Shortcode scored 84% from 54 tests.

About plugin

  • Plugin page: cb-visual-shortcode
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7.3
  • WordPress version: 6.3.1
  • First release: Mar 21, 2017
  • Latest release: Mar 22, 2017
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: xpointer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 623 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.30MB] [CPU: ▲1.65ms] Passed 4 tests

Analyzing server-side resources used by CB Visual Shortcode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2942.20 ▼1.89
Dashboard /wp-admin3.61 ▲0.3148.88 ▼0.50
Posts /wp-admin/edit.php3.66 ▲0.3147.53 ▲6.02
Add New Post /wp-admin/post-new.php6.25 ▲0.361,092.92 ▲986.84
Media Library /wp-admin/upload.php3.53 ▲0.3138.19 ▲2.96

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 73 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
CBVSInstaller

Browser metrics Passed 4 tests

An overview of browser requirements for CB Visual Shortcode
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.82 ▲0.461.74 ▲0.0742.92 ▼9.67
Dashboard /wp-admin2,203 ▲155.83 ▲0.9594.94 ▼22.3738.10 ▼11.58
Posts /wp-admin/edit.php2,089 ▲32.05 ▲0.0537.71 ▼3.2033.35 ▼2.62
Add New Post /wp-admin/post-new.php6,506 ▲4,96720.09 ▲1.771,002.69 ▲325.6545.48 ▼19.69
Media Library /wp-admin/upload.php1,388 ▲34.16 ▼0.0596.89 ▼8.9241.44 ▼0.90

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
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • CBVSInstaller
    • widget_theysaidso_widget
    • can_compress_scripts

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
Everything seems fine, however this is by no means 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 fix the following items
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'CBVSCodeFile' not found in wp-content/plugins/cb-visual-shortcode/vendor/CBPoint/VSFramework/Object.abstract.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'CBVSCodeFile' not found in wp-content/plugins/cb-visual-shortcode/vendor/CBPoint/VSFramework/StatedObjectStorage.abstract.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'CBVSCodeFile' not found in wp-content/plugins/cb-visual-shortcode/vendor/CBPoint/VSFramework/EventArgs.class.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'CBVSCodeFile' not found in wp-content/plugins/cb-visual-shortcode/vendor/CBPoint/VSFramework/StatedObjectStorage.interface.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'CBVSCodeFile' not found in wp-content/plugins/cb-visual-shortcode/vendor/CBPoint/VSFramework/Events.class.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'CBVSCodeFile' not found in wp-content/plugins/cb-visual-shortcode/Config/Config.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'CBVSCodeFile' not found in wp-content/plugins/cb-visual-shortcode/vendor/CBPoint/VSFramework/StatedObjectWPOptionStorage.class.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'CBVSCodeFile' not found in wp-content/plugins/cb-visual-shortcode/vendor/CBPoint/VSFramework/StatedObjectCustomStorage.class.php:6

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

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
10 plugin tags: post, visual, content, custom post, shortcode...

cb-visual-shortcode/cb-visual-shortcode.php Passed 13 tests

The main PHP script in "CB Visual Shortcode" version 1.0.0 is automatically included on every request by WordPress
42 characters long description:
Modify Shortcode attributes using web form

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
No dangerous file extensions were detected26,075 lines of code in 51 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript85,3594,26521,065
CSS8971252,499
PHP317671,3381,980
HTML19616447
JSON31084

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity7.86
▷ Minimum class complexity1.00
▷ Maximum class complexity54.00
Average method complexity1.90
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces1
Interfaces1
Traits0
Classes20
▷ Abstract classes630.00%
▷ Concrete classes1470.00%
▷ Final classes214.29%
Methods163
▷ Static methods2213.50%
▷ Public methods14387.73%
▷ Protected methods169.82%
▷ Private methods42.45%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants27
▷ Global constants00.00%
▷ Class constants27100.00%
▷ Public constants27100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
15 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
Media/Styles/jQuery-UI/images/ui-icons_222222_256x240.png6.76KB4.17KB▼ 38.24%
Media/Styles/jQuery-UI/images/ui-icons_555555_256x240.png6.82KB4.17KB▼ 38.82%
Media/Styles/jQuery-UI/images/ui-bg_glass_95_fef1ec_1x400.png0.32KB0.15KB▼ 54.82%
Media/Styles/jQuery-UI/images/ui-icons_444444_256x240.png6.83KB4.17KB▼ 38.86%
Media/Styles/jQuery-UI/images/ui-icons_2e83ff_256x240.png4.44KB4.17KB▼ 6.02%