83% zenost-shortcodes

Code Review | Zenost Shortcodes

WordPress plugin Zenost Shortcodes scored83%from 54 tests.

About plugin

  • Plugin page: zenost-shortcodes
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.1
  • WordPress version: 6.3.1
  • First release: Apr 21, 2015
  • Latest release: Mar 6, 2019
  • Number of updates: 26
  • Update frequency: every 54.4 days
  • Top authors: imran3229 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /1,686 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Zenost Shortcodes
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.29 ▼1.19
Dashboard /wp-admin3.31 ▲0.0147.30 ▼5.40
Posts /wp-admin/edit.php3.36 ▲0.0150.81 ▼4.19
Add New Post /wp-admin/post-new.php5.89 ▲0.0185.90 ▼33.08
Media Library /wp-admin/upload.php3.24 ▲0.0140.08 ▲2.31

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Zenost Shortcodes
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3814.74 ▲0.363.78 ▲1.8447.97 ▲8.93
Dashboard /wp-admin2,195 ▲185.64 ▼0.0588.66 ▼15.5837.81 ▼4.31
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0136.39 ▼3.4133.43 ▼9.82
Add New Post /wp-admin/post-new.php1,526 ▼517.69 ▼5.78643.94 ▼23.7052.07 ▼1.03
Media Library /wp-admin/upload.php1,397 ▼34.23 ▲0.0398.39 ▼18.4743.77 ▼0.25

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/zenost-shortcodes/shortcodes_tinymce.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/zenost-shortcodes/inc/shortcodes.php:8

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (Editor View), #2 (Editor Menu), #3 (Accordian), #4 (Columns), #5 (Headings), #6 (Lists), #7 (Buttons), #8 (Toggles)
You can take inspiration from this readme.txt

zenost-shortcodes/shortcodes_tinymce.php 85% from 13 tests

The entry point to "Zenost Shortcodes" version 1.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 246 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("zenost-shortcodes.php" instead of "shortcodes_tinymce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin551 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP26613234
JavaScript3125222
CSS18195

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
8 PNG files occupy 0.10MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png11.49KB7.05KB▼ 38.62%
screenshot-1.png36.42KB19.44KB▼ 46.61%
screenshot-5.png10.08KB6.31KB▼ 37.38%
screenshot-6.png5.89KB1.81KB▼ 69.25%
screenshot-2.png6.13KB3.55KB▼ 42.20%