77% shortcodes-generator-by-techradar-viet-nam

Code Review | Shortcodes Generator by TechRadar Việt Nam

WordPress plugin Shortcodes Generator by TechRadar Việt Nam scored77%from 54 tests.

About plugin

  • Plugin page: shortcodes-genera...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-4.9.2
  • WordPress version: 6.3.1
  • First release: Jan 23, 2018
  • Latest release: Jan 23, 2018
  • Number of updates: 8
  • Update frequency: every 0.1 days
  • Top authors: techradar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /588 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.38MB] [CPU: ▲3.00ms] Passed 4 tests

Analyzing server-side resources used by Shortcodes Generator by TechRadar Việt Nam
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.84 ▲0.3844.05 ▲2.65
Dashboard /wp-admin3.68 ▲0.3853.35 ▲3.53
Posts /wp-admin/edit.php3.80 ▲0.4452.06 ▲5.74
Add New Post /wp-admin/post-new.php6.28 ▲0.4088.55 ▲0.07
Media Library /wp-admin/upload.php3.61 ▲0.3844.47 ▲8.39

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 73 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Shortcodes Generator by TechRadar Việt Nam
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,937 ▲15113.95 ▼0.1912.64 ▲10.3352.18 ▲4.94
Dashboard /wp-admin2,218 ▲155.86 ▼0.0199.83 ▼18.7239.03 ▼6.87
Posts /wp-admin/edit.php2,097 ▼32.00 ▲0.0336.68 ▼2.2133.97 ▼1.68
Add New Post /wp-admin/post-new.php1,545 ▲1923.12 ▲5.49693.83 ▲7.9065.20 ▲13.65
Media Library /wp-admin/upload.php1,397 ▼04.22 ▼0.04111.01 ▼3.2248.46 ▼0.09

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/shortcodes-generator-by-techradar-viet-nam/inc/admin/fields/icon.php
  • 52× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: html_class in wp-content/plugins/shortcodes-generator-by-techradar-viet-nam/templates/zf_span.php on line 5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/shortcodes-generator-by-techradar-viet-nam/templates/zf_image.php:5
    • > PHP Notice
      Undefined variable: size in wp-content/plugins/shortcodes-generator-by-techradar-viet-nam/templates/zf_icon.php on line 9
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/shortcodes-generator-by-techradar-viet-nam/templates/zf_strong.php:8
    • > PHP Notice
      Undefined variable: key in wp-content/plugins/shortcodes-generator-by-techradar-viet-nam/inc/admin/fields/icon.php on line 2167
    • > PHP Notice
      Undefined variable: icon in wp-content/plugins/shortcodes-generator-by-techradar-viet-nam/templates/zf_icon.php on line 4
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/shortcodes-generator-by-techradar-viet-nam/templates/zf_section.php:4
    • > PHP Notice
      Undefined variable: html_class in wp-content/plugins/shortcodes-generator-by-techradar-viet-nam/templates/zf_strong.php on line 5
    • > PHP Notice
      Undefined variable: html_class in wp-content/plugins/shortcodes-generator-by-techradar-viet-nam/templates/zf_p.php on line 6
    • > PHP Notice
      Undefined variable: icon in wp-content/plugins/shortcodes-generator-by-techradar-viet-nam/templates/zf_icon.php on line 6

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

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Contributors: The plugin contributors field is not present
  • Screenshots: Please add an image for screenshot #2 (Base on bootstrap 3)
The official readme.txt might help

shortcodes-generator-by-techradar-viet-nam/zf-shortcodes.php 85% from 13 tests

The principal PHP file in "Shortcodes Generator by TechRadar Việt Nam" v. 1.0.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("shortcodes-generator-by-techradar-viet-nam.php" instead of "zf-shortcodes.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected21,113 lines of code in 58 files:
LanguageFilesBlank linesComment linesLines of code
CSS1159610412,430
JavaScript101,1354433,738
PHP331,1622713,541
SVG200853
PO File1161222299
Sass1813252

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity15.17
▷ Minimum class complexity1.00
▷ Maximum class complexity46.00
Average method complexity3.15
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods40
▷ Static methods25.00%
▷ Public methods3997.50%
▷ Protected methods12.50%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants5
▷ Global constants5100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
inc/admin/assets/images/ui-icons_222222_256x240.png6.84KB4.18KB▼ 38.88%