83% semantic-shortcode

Code Review | Semantic Shortcode

WordPress plugin Semantic Shortcode scored83%from 54 tests.

About plugin

  • Plugin page: semantic-shortcode
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7
  • WordPress version: 6.3.1
  • First release: May 13, 2015
  • Latest release: Dec 11, 2016
  • Number of updates: 8
  • Update frequency: every 72.9 days
  • Top authors: sachin8600 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,805 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.17MB] [CPU: ▼5.28ms] Passed 4 tests

This is a short check of server-side resources used by Semantic Shortcode
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1836.19 ▼5.37
Dashboard /wp-admin3.47 ▲0.1745.47 ▼2.12
Posts /wp-admin/edit.php3.58 ▲0.2347.96 ▲1.88
Add New Post /wp-admin/post-new.php6.05 ▲0.1784.25 ▼14.28
Media Library /wp-admin/upload.php3.39 ▲0.1733.89 ▲0.66
Semantic Shortcode /wp-admin/edit.php?page=semantic-shortcode3.4036.10

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Semantic Shortcode
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲17013.81 ▼0.5710.66 ▲8.8551.75 ▲8.11
Dashboard /wp-admin2,212 ▲215.83 ▲0.9596.00 ▼7.9440.54 ▲1.52
Posts /wp-admin/edit.php2,095 ▲62.06 ▲0.0239.21 ▲4.0534.12 ▼0.26
Add New Post /wp-admin/post-new.php1,533 ▼223.22 ▲2.19652.14 ▼7.5852.39 ▼2.62
Media Library /wp-admin/upload.php1,394 ▲34.20 ▼0.0195.66 ▼3.1846.42 ▲3.99
Semantic Shortcode /wp-admin/edit.php?page=semantic-shortcode2,4832.5851.3286.30

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

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 everything seems fine, this is not 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 items
  • 16× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/semantic-shortcode/inc/element2/reveal.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/semantic-shortcode/inc/element1/button.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/semantic-shortcode/inc/element1/header.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/semantic-shortcode/inc/element1/divider.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/semantic-shortcode/inc/collections/grid.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/semantic-shortcode/inc/element2/image.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/semantic-shortcode/inc/modules/transition.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/semantic-shortcode/inc/modules/accordioan.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/semantic-shortcode/inc/element1/button.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/semantic-shortcode/inc/element1/icon.php:19

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

readme.txt 75% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Donate link: Please fix this invalid url: ""
  • Tags: Please delete some tags, you are using 20 tag instead of maximum 10
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === semantic-shortcode === )
  • Screenshots: Add images for these screenshots: #1 (This screen backend shortcode document to screenshot-1.png), #2 (This screen backend editor screen to screenshot-2.png)
You can look at the official readme.txt

semantic-shortcode/semantic-shortcode.php 92% from 13 tests

The main PHP file in "Semantic Shortcode" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • 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 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected3,557 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript36111,462
PHP18363721,078
SVG2001,015
CSS20102

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.47
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods15
▷ Static methods16.67%
▷ Public methods1280.00%
▷ Protected methods00.00%
▷ Private methods320.00%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 compressed PNG files occupy 0.10MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon.png1.34KB1.24KB▼ 7.38%
screenshot-1.png34.97KB35.67KB0.00%
screenshot-2.png37.40KB37.76KB0.00%
css/themes/default/assets/images/flags.png27.46KB29.21KB0.00%