83% scode-by-mojwp

Code Review | sCode (Easy Shortcodes)

WordPress plugin sCode (Easy Shortcodes) scored83%from 54 tests.

About plugin

  • Plugin page: scode-by-mojwp
  • Plugin version: 1.1.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.7
  • WordPress version: 6.3.1
  • First release: Jun 13, 2015
  • Latest release: Jun 30, 2021
  • Number of updates: 16
  • Update frequency: every 138.1 days
  • Top authors: mojwp (87.5%)wpshopbiz (18.75%)

Code review

54 tests

User reviews

4 reviews

Install metrics

700+ active /3,474 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.93ms] Passed 4 tests

A check of server-side resources used by sCode (Easy Shortcodes)
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0052.10 ▲13.53
Dashboard /wp-admin3.32 ▲0.0248.89 ▼2.99
Posts /wp-admin/edit.php3.37 ▲0.0249.77 ▼6.59
Add New Post /wp-admin/post-new.php5.90 ▲0.0284.09 ▼11.61
Media Library /wp-admin/upload.php3.24 ▲0.0241.26 ▲5.48
My shortcodes /wp-admin/admin.php?page=scode3.2840.49
Instruction /wp-admin/admin.php?page=scode_support3.2134.23

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 16 new files
Database: 2 new tables, 6 new options
New tables
wp_shortcodes
wp_shortcodes_groups
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for sCode (Easy Shortcodes)
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.22 ▼1.431.80 ▼0.1043.56 ▼4.11
Dashboard /wp-admin2,238 ▲535.89 ▲0.9898.36 ▼10.7738.50 ▼9.04
Posts /wp-admin/edit.php2,118 ▲292.05 ▲0.0339.77 ▲0.0836.63 ▲1.91
Add New Post /wp-admin/post-new.php1,552 ▲3823.02 ▲5.19609.64 ▼53.0347.82 ▼5.59
Media Library /wp-admin/upload.php1,411 ▲264.19 ▼0.00101.34 ▼0.4542.30 ▲2.12
My shortcodes /wp-admin/admin.php?page=scode1,4914.5163.4227.47
Instruction /wp-admin/admin.php?page=scode_support8551.7328.9732.31

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

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)
Even though no errors were found, 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
The following issues need your attention
  • 6× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/scode-by-mojwp/includes/global.php
    • > /wp-content/plugins/scode-by-mojwp/includes/frontend.php
    • > /wp-content/plugins/scode-by-mojwp/scode.php
    • > /wp-content/plugins/scode-by-mojwp/includes/admin.php
    • > /wp-content/plugins/scode-by-mojwp/includes/ajax.php
    • > /wp-content/plugins/scode-by-mojwp/includes/functions.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 17 tag instead of maximum 10
You can look at the official readme.txt

scode-by-mojwp/scode.php 85% from 13 tests

This is the main PHP file of "sCode (Easy Shortcodes)" version 1.1.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("scode-by-mojwp.php" instead of "scode.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
Success! There were no dangerous files found in this plugin1,019 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP69713538
JavaScript1403197
CSS1270170
PO File14553114

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions1894.74%
▷ Anonymous functions15.26%
Constants3
▷ Global constants3100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon.png1.23KB0.27KB▼ 78.29%