10% kalimah-shortcodes

Code Review | Kalimah Shortcodes

WordPress plugin Kalimah Shortcodes scored10%from 54 tests.

About plugin

  • Plugin page: kalimah-shortcodes
  • Plugin version: 1.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.6
  • WordPress version: 6.3.1
  • First release: Sep 16, 2016
  • Latest release: Nov 1, 2016
  • Number of updates: 37
  • Update frequency: every 1.2 days
  • Top authors: khr2003 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,332 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/kalimah-shortcodes/kalimah-shortcodes.php+88
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.07MB] [CPU: ▼57.22ms] Passed 4 tests

An overview of server-side resources used by Kalimah Shortcodes
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.06 ▲0.6010.71 ▼29.70
Dashboard /wp-admin4.08 ▲0.7414.02 ▼52.37
Posts /wp-admin/edit.php4.08 ▲0.7313.17 ▼35.07
Add New Post /wp-admin/post-new.php4.08 ▼1.8014.21 ▼111.74
Media Library /wp-admin/upload.php4.08 ▲0.8614.89 ▼18.43

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 163 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Kalimah Shortcodes
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /10,938 ▲8,17714.51 ▲0.2127.16 ▲25.2685.71 ▲44.08
Dashboard /wp-admin10,194 ▲8,0174.88 ▼1.00114.50 ▲23.51174.81 ▲133.18
Posts /wp-admin/edit.php10,096 ▲7,9962.11 ▲0.0642.06 ▲2.69155.87 ▲120.03
Add New Post /wp-admin/post-new.php16,232 ▲14,68720.34 ▼2.80930.14 ▲294.6934.27 ▼19.34
Media Library /wp-admin/upload.php9,396 ▲7,9964.28 ▲0.09207.36 ▲104.3145.58 ▼1.22

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/kalimah-shortcodes/kalimah-shortcodes.php+88
    Trying to access array offset on value of type bool
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      require_once(): Failed opening required 'Mobile_Detect.php' (include_path='.:/usr/share/php') in wp-content/plugins/kalimah-shortcodes/includes/detect.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kalimah-shortcodes/kalimah-shortcodes.php:75
    • > PHP Warning
      require_once(Mobile_Detect.php): failed to open stream: No such file or directory in wp-content/plugins/kalimah-shortcodes/includes/detect.php on line 12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: There are too many tags (12 tag instead of maximum 10)
The official readme.txt is a good inspiration

kalimah-shortcodes/kalimah-shortcodes.php Passed 13 tests

This is the main PHP file of "Kalimah Shortcodes" version 1.3.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
75 characters long description:
A premium shortcodes plugin with 40 amazingly designed shortcodes for free!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected40,647 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
CSS113,74422320,281
PHP81,3811,2689,576
SVG4036,440
JavaScript74765203,510
PO File1410595840

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity44.78
▷ Minimum class complexity1.00
▷ Maximum class complexity227.00
Average method complexity4.43
▷ Minimum method complexity1.00
▷ Maximum method complexity82.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods230
▷ Static methods6327.39%
▷ Public methods22196.09%
▷ Protected methods20.87%
▷ Private methods73.04%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants32
▷ Global constants2165.62%
▷ Class constants1134.38%
▷ Public constants11100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
111 PNG files occupy 5.37MB with 2.87MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/patterns/green20.png76.23KB39.60KB▼ 48.06%
includes/patterns/VF_aa01.png19.39KB10.72KB▼ 44.71%
includes/patterns/Dotted9.png20.39KB10.72KB▼ 47.41%
includes/patterns/stripes8.png2.96KB0.16KB▼ 94.75%
includes/patterns/blue11.png56.32KB37.90KB▼ 32.71%